10.3: Change the look and language of the fax cover page
Nov 16, '03 12:48:00AM • Contributed by: itob
Nov 16, '03 12:48:00AM • Contributed by: itob
The design or the language of the fax cover page can be edited in the file /usr -> libexec -> fax -> coverpage.py; the file is written in Python. Back up the file and open it with Pico or another command line text editor:
$ cd /usr/libexec/fax $ sudo cp coverpage.py coverpage.py_back $ sudo pico -w coverpage.pyEdit the following lines to change the language:
subject_title = 'Subject' from_title = 'From' to_title = 'To' date_title = 'Date' pages_title = 'Sheets to follow'The date format can be changed on line 95:
f = os.popen ('date')
to something like:
f = os.popen ('date "+%d.%m.%Y, %H:%M:%S"')
The Header is defined in the function make_header_html on line 83 as HTML. As an example, change the alignment of the cells or the text Format. Simple CSS Styles and even GIF or JPEG images can be used. Here's a small example:
return ('<html>\n'
+ '<head>\n'
+ '<meta http-equiv=Content-Type content="text/html; charset=UTF-8">'
+ '</head>\n'
+ '<body text="#000000" style="font-family:Helvetica;">\n
+ '<img src="file://path/to/company_logo.gif"><br>n<table>\n'
+ (to_name and make_row (to_title, to_name) or '')
+ (from_name and make_row (from_title, from_name) or '')
+ (date_string and make_row (date_title, date_string) or '')
+ (subject_text and make_row (subject_title, subject_text, 'b') or '')
+ (pages_string and make_row (pages_title, pages_string) or '')
+ '</table>\n</body>\n</html>')
Just look at the file an you will find some more interesting stuff. Someone who is familiar with python can change a lot more things than I describe here. Add Company Address, footer etc.
•
[14,054 views]
