root / tea4cups / trunk / README @ 627

Revision 627, 5.2 kB (checked in by jerome, 19 years ago)

Fix for Python 2.1

  • Property svn:keywords set to Author Date Id Rev
RevLine 
[567]1# $Id$
2
[576]3Tea4CUPS : Tee for CUPS
[567]4
[612]5(c) 2005 Jerome Alet <alet@librelogiciel.com>
[567]6This program is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2 of the License, or
9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program; if not, write to the Free Software
18Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
19
20=============================================================================
21
[576]22Tea4CUPS is the equivalent of the *nix command 'tee', but as a CUPS
[567]23backend.
24
[576]25Tea4CUPS behaves just like any other CUPS backend, but allows you to
[567]26transparently send print jobs' datas to any number of outputs : other
27CUPS backends, files or pipes.
28
29This for example allows you to output the same print job on several
30printers at the same time, which is not possible with CUPS.
31
32Another possibility would be for example to send the same document to
33a printer, a PDF generator, a Fax, and as an attachment to an email
34message, all of this by printing it a single time.
35
[598]36Tea4CUPS provides three ways to launch commands :
37
38        - prehooks : these are guaranteed to be launched before the
39                     print job is sent to the real printer.
[603]40                     Any prehook which exits -1 can cancel the
41                     print job.
[598]42                     
43        - tees : these are launched at the same time the job is being             
[603]44                 sent to the real printer, unless the job was
45                 previously cancelled by a prehook.
[598]46                 
47        - posthooks : these are guaranteed to be launched after the
[603]48                      print job has been sent to the real printer,
49                      unless the job was previously cancelled by a
50                      prehook.
[598]51                 
[586]52To help your own commands, Tea4CUPS makes available as part of the
[617]53environment several variables which can be used from the
[586]54commands you use :
55
56        TEAPRINTERNAME : The print queue name.
57        TEADIRECTORY : Tea4CUPS output directory.
58        TEADATAFILE : Full name of Tea4CUPS work file (in $TEADIRECTORY).
59        TEAJOBSIZE : Job's size in bytes.
60        TEAMD5SUM : MD5 sum of the job's datas.
61        TEACLIENTHOST : Client's hostname or IP address.
62        TEAJOBID : Job's Id.
63        TEAUSERNAME : Name of the user who launched the print job.
64        TEATITLE : Job's title.
65        TEACOPIES : Number of copies requested.
66        TEAOPTIONS : Options of the print job.
67        TEAINPUTFILE : Print job's data file or empty when job read from stdin.
[615]68        TEABILLING : Job's billing code (lp -o job-billing=SomeCode file.ps)
69        TEACONTROLFILE : Job's IPP message file (usually /var/spool/cups/c?????)
[598]70        TEASTATUS : Original CUPS backend's exit code : ONLY AVAILABLE FROM
[603]71                    posthooks, obviously.
[586]72       
[590]73In the case you want to use both Tea4CUPS and PyKota, you MUST install
74PyKota v1.22alpha2 or higher to avoid a race condition.
75
[627]76NB : Tea4CUPS requires a version of Python >= 2.1
77
[567]78=============================================================================
79
80Installation :
81--------------
82
[591]83  0 - Download Tea4CUPS from :
84 
85        http://www.librelogiciel.com/software/Tea4CUPS/action_Presentation
86       
[592]87      and extract it : 
88     
89        $ tar -zxf tea4cups-x.yy.tar.gz
90       
91        where x.yy is Tea4CUPS' version number.
92       
[576]93  1 - Copy the 'tea4cups' command into CUPS' backend directory,
[567]94      for example :
95     
[576]96        $ cp tea4cups /usr/lib/cups/backend
[567]97       
98  2 - Restart CUPS in order for this new backend to be detected.       
99 
100  3 - Either from CUPS' web interface, add new printers with
[576]101      'Tea4CUPS managed' in front of the device's name.
[567]102         
103      Or by directly modifying CUPS' printers.conf file, prepend   
[576]104      each DeviceURI value with 'tea4cups://', and restart CUPS.
[567]105     
[576]106  4 - Copy tea4cups.conf into CUPS' configuration directory (where   
[567]107      cupsd.conf resides) :
108     
[576]109        $ cp tea4cups.conf /etc/cups/
[567]110       
[576]111  5 - Modify tea4cups.conf to suit your needs. Several examples     
[567]112      are included.
113     
114  6 - There's no 6 !   
115 
116=============================================================================
117
118Troubleshooting :
119-----------------
120
121  1 - Set "LogLevel debug2" in CUPS' cupsd.conf
122 
123  2 - Restart CUPS.
124 
[576]125  3 - Set "debug: yes" in the [global] section of tea4cups.conf
[567]126 
127  4 - Print something on a print queue managed
[576]128      by Tea4CUPS.
[567]129     
130  5 - Look at CUPS' error_log file for diagnostic and error messages.
131 
132=============================================================================
[591]133
134CUPS (Common UNIX(r) Printing System) is trademark property of Easy Software
135Products.
136
137You can download CUPS from :
138
139        http://www.cups.org
140
141=============================================================================
[567]142   
143Please e-mail bugs to : alet@librelogiciel.com (Jerome Alet)
Note: See TracBrowser for help on using the browser.