123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234 |
- NAME
- sylprint.pl - process a Claws Mail mail and print it using
- enscript if available (or lpr if not)
- SYNTAX
- sylprint.pl '%s' [-r] [options]
- DESCRIPTION
- Sylprint is a perl script for printing mails from Claws Mail
- mailer. Syntax given is appropiate (and designed) for usage
- in the "Printing" box of Claws Mail that appears when going
- Configuration->Common Preferences menu, Other tab.
- Sylprint translates the english header names given by
- Claws Mail into the local language if available. Also wraps
- long lines without breaking words, and indents headers, all
- in order to make a nicer and easier to read hardcopy.
- There are other programs that produce a nicer hardcopy,
- for example muttprint, but you pay the price of requiring
- LaTeX installed for the job. Sylprint tries to do it nice,
- but no so nice and also lowering resources required.
- It also has a GTK interface (in development) if you don't
- want to remember all those flags. The interface is only that,
- an interface, thus isn't required at all for running
- sylprint script, but while an experienced user may prefer
- to use the script straightforward, a beginner may feel more
- comfortable with a "printing panel"-like window.
- OPTIONS
- Options may be specfied in any order, but separated (i.e.: a
- valid specification is "-e -h" while "-eh" is not).
- All the options except -p and -v have the purpose of changing
- or disabling something that is done by default, so if you like
- the default output all may be totally useless. But not always.
- Options are:
- -e Do not use enscript at all (even if available).
- -f font
- Use font for printing mail. Font specification style
- is name[@{size|width/height}] (examples: 'Times',
- 'Times@12', 'Times@8/10').
- Font syntax correctness is checked, but availability
- of the font on the system is not checked.
- Default font is 'Courier@9/13'.
- -h Do not print page header. Page header includes date
- and page numbering and is generated by enscript.
- -p printer
- Use printer for printing (default is 'lp'). Printer
- is not checked at all, so must be a valid printer
- name within your system.
- -r Do not parse user configuration file (sylprint.rc).
- This must be the first option after filename if used.
- -s [char]
- Do not print separator line between headers and body
- unless char is specified, then set char as separator
- character in place of default one (underscore).
- -t Do not translate mail headers.
- -v Preview mail before printing. Preview is done using
- gv for enscript processed mails and gless for non
- processed ones.
- You can specify this option twice to avoid printing
- at all, in case you only want a preview.
- -w [number]
- If no number is given, disables line wrapping in
- mail text, else sets the column for wrapping to
- number instead of 79, which is the default value.
- -H Do not print mail headers (From, To, etc.). This also
- disables separator line printing.
- -Q [quote chars]
- Do not print quoted text (usually introduced by '>').
- You may supply the character or characters that lead
- the quoted text. These character(s) must be the first
- on a line to be interpreted as quoted.
- Remember to escape them from shell enclosed in single
- quotes ('|' for example) if required.
- -S Do not print mail signature (mail signatures started
- with -- and carriage return).
- -- Finish option parsing. All the options specified after
- this are passed unmodified to enscript or lpr.
- DIAGNOSTICS
- "required filename missing"
- No arguments were provided to the script, at least
- one, the filename with the mail to be printed, is
- required. See SYNTAX.
- "invalid font"
- The parameter of -f option does not match a valid
- font specification. See OPTIONS or enscript manpage.
- "invalid number"
- The parameter of -w option must be a decimal number
- without sign. See SYNTAX.
- "/usr/bin/lpr not found"
- The line printer command couldn't be stated. Be sure
- you have it installed where you configured, and if
- file permissions allow you to execute it.
- In some systems access to printer(s) is restricted.
-
- "trying lpr: error message"
- The lpr command failed by some reason, luckily by the
- stated in error message.
-
- "/usr/bin/enscript not found, using lpr"
- Enscript can't be found there, be sure it's installed
- and you set the right path in the config.
- As fallback, mail is printed using (ugly) lpr.
-
- "charset not supported by enscript: using lpr"
- Enscript doesn't (actually) support:
- * euc-jp (Japanese)
- * euc-kr (Korean)
- * iso-8859-9 (Turkish)
- * gb2312, big5 (Chinese)
- charset encodings, so only lpr can be used with them.
-
- ENVIRONMENT
- LANG If defined is used to guess the language that should
- be tried for translating and the charset encoding.
-
- HOME For getting Claws Mail user's config directory.
- USER For building temp files.
- FILES
- sylprint.pl
- The script itself.
- sylprint.rc
- Stores user default preferred configuration for the
- script. Settings in this file may be overriden by
- command line options. Must be stored in the same
- directory of the script and/or in the ~/.claws-mail
- one (Claws Mail user's configuration directory).
-
- /tmp/sylprint.username.number
- Temporary files created to store a processed mail.
- Username is the login name of the user invoking the
- sylprint script and number is the PID of the script
- process itself.
- These files are actually deleted unless something went
- really wrong.
- /tmp/sylprint.username.number.ps
- Same as the former, used to store PostScript preview
- of mail if preview is enabled.
- SEE ALSO
- Sylpheed: http://sylpheed.good-day.net
- Claws Mail: http://claws-mail.org/
- Enscript: http://www.iki.fi/~mtr/genscript/
- Muttprint: http://bwalle.exit.mytoday.de/muttprint/
- Sylprint: http://www.aic.uniovi.es/mones/sylprint/
- enscript(1), lpr(1), gv(1)
- LIMITATIONS
- Supported languages are only those supported by Claws Mail.
-
- Supported encodings are only those supported by enscript.
- Charset encodings not supported by enscript are printed via
- lpr.
- There are languages partially translated, mainly because
- the strings lack of translation in the po files or I was
- unable to guess a correct one from them.
- Currently Greek is the only language in this category.
- BUGS
- There is no enough command line options to set all config
- variables. This is not really a bug, because is intentional,
- only most common/useful features have an option. The rest
- can be set on the rc file.
- Diagnostic messages should be nicer and more informative.
- If you use a proportional font for printing mail with
- enscript, all the header's alignment and long line wrapping
- may be (and almost surely be) lost.
- AUTHOR
- The original author is Ricardo Mones Lastra, but much more
- people have, indirectly, contributed to this by providing
- Claws Mail translations, here used again:
-
- Alfons Hoogervorst; Andreas Hinz; Ante Karamatiæ;
- Danilo Bodei; Dmitry S. Sivachenko; Fabio Junior
- Beneditto; Frank J. J. Weng; Görkem Çetin; Gustavo
- Noronha Silva; Hiroyuki Yamamoto; Jens Oberender;
- Joakim Andreasson; Martin Schaaf; Melvin Hadasht;
- Michalis Kabrianis; Paul Rolland; Peeter Vois;
- Przemyslaw Sulek; Sergey Vlasov; Székely Krisztián;
- Vincent van Adrighem; Vladimír Marek; Xiangxin Luo.
-
- (Obtained from "Last-Translator" field on current po files)
- LICENSE
- Sylprint script, config files and documentation.
- (c) 2001 by Ricardo Mones Lastra <mones@aic.uniovi.es>.
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 3
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
|