2006-06-12 [paul] 2.2.3cvs14
[claws.git] / tools / README.sylprint
1
2 NAME
3         sylprint.pl - process a Sylpheed mail and print it using 
4         enscript if available (or lpr if not)
5
6 SYNTAX
7         sylprint.pl '%s' [-r] [options]
8
9 DESCRIPTION
10         Sylprint is a perl script for printing mails from Sylpheed
11         mailer. Syntax given is appropiate (and designed) for usage 
12         in the "Printing" box of Sylpheed that appears when going
13         Configuration->Common Preferences menu, Other tab.
14
15         Sylprint translates the english header names given by 
16         Sylpheed into the local language if available. Also wraps
17         long lines without breaking words, and indents headers, all
18         in order to make a nicer and easier to read hardcopy.
19
20         There are other programs that produce a nicer hardcopy,
21         for example muttprint, but you pay the price of requiring
22         LaTeX installed for the job. Sylprint tries to do it nice,
23         but no so nice and also lowering resources required.
24
25         It also has a GTK interface (in development) if you don't
26         want to remember all those flags. The interface is only that,
27         an interface, thus isn't required at all for running
28         sylprint script, but while an experienced user may prefer
29         to use the script straightforward, a beginner may feel more
30         comfortable with a "printing panel"-like window.
31
32 OPTIONS
33         Options may be specfied in any order, but separated (i.e.: a
34         valid specification is "-e -h" while "-eh" is not). 
35
36         All the options except -p and -v have the purpose of changing
37         or disabling something that is done by default, so if you like
38         the default output all may be totally useless. But not always.
39
40         Options are:
41
42         -e      Do not use enscript at all (even if available).
43
44         -f font
45                 Use font for printing mail. Font specification style
46                 is name[@{size|width/height}] (examples: 'Times',
47                 'Times@12', 'Times@8/10'). 
48                 Font syntax correctness is checked, but availability
49                 of the font on the system is not checked.
50                 Default font is 'Courier@9/13'.
51
52         -h      Do not print page header. Page header includes date
53                 and page numbering and is generated by enscript.
54
55         -p printer
56                 Use printer for printing (default is 'lp'). Printer
57                 is not checked at all, so must be a valid printer
58                 name within your system.
59
60         -r      Do not parse user configuration file (sylprint.rc).
61                 This must be the first option after filename if used.
62
63         -s [char] 
64                 Do not print separator line between headers and body
65                 unless char is specified, then set char as separator
66                 character in place of default one (underscore).
67
68         -t      Do not translate mail headers.
69
70         -v      Preview mail before printing. Preview is done using
71                 gv for enscript processed mails and gless for non
72                 processed ones.
73                 You can specify this option twice to avoid printing
74                 at all, in case you only want a preview.
75
76         -w [number]
77                 If no number is given, disables line wrapping in
78                 mail text, else sets the column for wrapping to
79                 number instead of 79, which is the default value.
80
81         -H      Do not print mail headers (From, To, etc.). This also
82                 disables separator line printing.
83
84         -Q [quote chars]        
85                 Do not print quoted text (usually introduced by '>'). 
86                 You may supply the character or characters that lead 
87                 the quoted text. These character(s) must be the first
88                 on a line to be interpreted as quoted. 
89                 Remember to escape them from shell enclosed in single
90                 quotes ('|' for example) if required.
91
92         -S      Do not print mail signature (mail signatures started
93                 with -- and carriage return).
94
95         --      Finish option parsing. All the options specified after
96                 this are passed unmodified to enscript or lpr.
97
98 DIAGNOSTICS
99         "required filename missing"
100                 No arguments were provided to the script, at least
101                 one, the filename with the mail to be printed, is
102                 required. See SYNTAX.
103
104         "invalid font"
105                 The parameter of -f option does not match a valid
106                 font specification. See OPTIONS or enscript manpage.
107
108         "invalid number"
109                 The parameter of -w option must be a decimal number
110                 without sign. See SYNTAX.
111
112         "/usr/bin/lpr not found"
113                 The line printer command couldn't be stated. Be sure
114                 you have it installed where you configured, and if
115                 file permissions allow you to execute it. 
116                 In some systems access to printer(s) is restricted.
117         
118         "trying lpr: error message"
119                 The lpr command failed by some reason, luckily by the
120                 stated in error message.
121         
122         "/usr/bin/enscript not found, using lpr"
123                 Enscript can't be found there, be sure it's installed
124                 and you set the right path in the config.
125                 As fallback, mail is printed using (ugly) lpr.
126         
127         "charset not supported by enscript: using lpr"
128                 Enscript doesn't (actually) support:
129                         * euc-jp       (Japanese)
130                         * euc-kr       (Korean)
131                         * iso-8859-9   (Turkish)
132                         * gb2312, big5 (Chinese)
133                 charset encodings, so only lpr can be used with them.
134         
135 ENVIRONMENT     
136         LANG    If defined is used to guess the language that should
137                 be tried for translating and the charset encoding.
138         
139         HOME    For getting Sylpheed user's config directory.
140
141         USER    For building temp files.
142
143 FILES
144         sylprint.pl
145                 The script itself.
146
147         sylprint.rc
148                 Stores user default preferred configuration for the
149                 script. Settings in this file may be overriden by
150                 command line options. Must be stored in the same
151                 directory of the script and/or in the ~/.sylpheed-claws
152                 one (Sylpheed user's configuration directory).
153         
154         /tmp/sylprint.username.number
155                 Temporary files created to store a processed mail.
156                 Username is the login name of the user invoking the
157                 sylprint script and number is the PID of the script
158                 process itself.
159                 These files are actually deleted unless something went
160                 really wrong.
161
162         /tmp/sylprint.username.number.ps
163                 Same as the former, used to store PostScript preview
164                 of mail if preview is enabled.
165
166 SEE ALSO
167         Sylpheed: http://sylpheed.good-day.net
168         Sylpheed Claws: http://sylpheed-claws.sourceforge.net
169         Enscript: http://www.iki.fi/~mtr/genscript/
170         Muttprint: http://bwalle.exit.mytoday.de/muttprint/
171         Sylprint: http://www.aic.uniovi.es/mones/sylprint/
172
173         enscript(1), lpr(1), gv(1)
174
175 LIMITATIONS
176         Supported languages are only those supported by Sylpheed.
177          
178         Supported encodings are only those supported by enscript.
179         Charset encodings not supported by enscript are printed via
180         lpr.
181
182         There are languages partially translated, mainly because
183         the strings lack of translation in the po files or I was 
184         unable to guess a correct one from them. 
185         Currently Greek is the only language in this category.
186
187 BUGS
188         There is no enough command line options to set all config
189         variables. This is not really a bug, because is intentional,
190         only most common/useful features have an option. The rest
191         can be set on the rc file.
192
193         Diagnostic messages should be nicer and more informative.
194
195         If you use a proportional font for printing mail with 
196         enscript, all the header's alignment and long line wrapping
197         may be (and almost surely be) lost.
198
199 AUTHOR
200         The original author is Ricardo Mones Lastra, but much more
201         people have, indirectly, contributed to this by providing
202         Sylpheed translations, here used again:
203         
204                 Alfons Hoogervorst; Andreas Hinz; Ante Karamatiæ;
205                 Danilo Bodei; Dmitry S. Sivachenko; Fabio Junior 
206                 Beneditto; Frank J. J. Weng; Görkem Çetin; Gustavo
207                 Noronha Silva; Hiroyuki Yamamoto; Jens Oberender;
208                 Joakim Andreasson; Martin Schaaf; Melvin Hadasht;
209                 Michalis Kabrianis; Paul Rolland; Peeter Vois;
210                 Przemyslaw Sulek; Sergey Vlasov; Székely Krisztián;
211                 Vincent van Adrighem; Vladimír Marek; Xiangxin Luo.
212                 
213         (Obtained from "Last-Translator" field on current po files)
214
215 LICENSE
216         Sylprint script, config files and documentation.
217         (c) 2001 by Ricardo Mones Lastra <mones@aic.uniovi.es>.
218
219         This program is free software; you can redistribute it and/or 
220         modify it under the terms of the GNU General Public License 
221         as published by the Free Software Foundation; either version 2
222         of the License, or (at your option) any later version.
223         
224         This program is distributed in the hope that it will be useful,
225         but WITHOUT ANY WARRANTY; without even the implied warranty of
226         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
227         GNU General Public License for more details.
228         
229         You should have received a copy of the GNU General Public 
230         License along with this program; if not, write to the Free 
231         Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
232         MA 02111-1307, USA.
233