- Timestamp:
- 06/12/05 23:07:29 (19 years ago)
- Location:
- tea4cups/trunk
- Files:
-
- 4 modified
Legend:
- Unmodified
- Added
- Removed
-
tea4cups/trunk/CREDITS
r644 r645 26 26 The following people supports the Tea4CUPS project enhancement 27 27 by funding it : 28 28 29 29 - Anwar Bashir - University of Teesside 30 30 31 31 Contributors : 32 32 -------------- 33 33 34 34 The following people contributed to the Tea4CUPS project : 35 35 36 36 - Peter Stuge : rewrote most of the subprocess management stuff. 37 37 … … 41 41 THINK YOU DESERVE TO BE LISTED, JUST SEND ME AN EMAIL 42 42 ASKING FOR BEING INCLUDED. 43 43 44 44 I APOLOGIZE IN ADVANCE IF I'VE FORGOTTEN TO ADD YOUR NAME. 45 46 ALSO, SOME PEOPLE MAY HAVE REFUSED TO BE LISTED HERE, THIS 45 46 ALSO, SOME PEOPLE MAY HAVE REFUSED TO BE LISTED HERE, THIS 47 47 IS YOUR RIGHT TO DO SO TOO, JUST TELL ME. 48 48 49 49 ============================================================== -
tea4cups/trunk/NEWS
r644 r645 21 21 22 22 Tea4CUPS News : 23 23 24 24 * 2.12alpha : 25 25 26 26 - Greatly improved the IPP parser. 27 27 28 28 - When printing test pages from CUPS' web interface, the empty username 29 29 is now overwritten with the username CUPS is running as. 30 30 31 31 * 2.11 : 32 32 33 33 - Now works with old releases of Python (>= 2.1) 34 34 35 35 - More powerful error handling at startup time. 36 37 - Ignores errors in posthooks because the job was probably 36 37 - Ignores errors in posthooks because the job was probably 38 38 successfully printed so no need to stop the print queue. 39 39 We log a warning instead in this case. 40 41 * 2.10 : 42 40 41 * 2.10 : 42 43 43 - Makes the IPP message filename and the Job's billing code available. 44 44 45 45 * 2.00 : 46 46 47 47 - Introduces the notions of pre and post hooks. 48 48 49 49 - Prehooks can decide to entirely cancel the print job if needed. 50 50 -
tea4cups/trunk/README
r644 r645 30 30 printers at the same time, which is not possible with CUPS. 31 31 32 Another possibility would be for example to send the same document to 32 Another possibility would be for example to send the same document to 33 33 a printer, a PDF generator, a Fax, and as an attachment to an email 34 34 message, all of this by printing it a single time. 35 35 36 Tea4CUPS allows this by permitting you to easily plug your own 37 commands into the very last stage of CUPS' filtering chain. 36 Tea4CUPS allows this by permitting you to easily plug your own 37 commands into the very last stage of CUPS' filtering chain. 38 38 39 39 Tea4CUPS provides two ways to launch commands : 40 40 41 - prehooks : these are guaranteed to be launched before the 41 - prehooks : these are guaranteed to be launched before the 42 42 print job is sent to the real printer. 43 Any prehook which exits -1 can cancel the 43 Any prehook which exits -1 can cancel the 44 44 print job. 45 45 46 46 - posthooks : these are guaranteed to be launched after the 47 47 print job has been sent to the real printer, 48 48 unless the job was previously cancelled by a 49 49 prehook. 50 50 51 51 To help your own commands, Tea4CUPS makes available as part of the 52 52 environment several variables which can be used from the … … 67 67 TEABILLING : Job's billing code (lp -o job-billing=SomeCode file.ps) 68 68 TEACONTROLFILE : Job's IPP message file (usually /var/spool/cups/c?????) 69 TEASTATUS : Original CUPS backend's exit code : ONLY AVAILABLE FROM 69 TEASTATUS : Original CUPS backend's exit code : ONLY AVAILABLE FROM 70 70 posthooks, obviously. 71 72 In the case you want to use both Tea4CUPS and PyKota, you MUST install 71 72 In the case you want to use both Tea4CUPS and PyKota, you MUST install 73 73 PyKota v1.22alpha2 or higher to avoid a race condition. 74 74 … … 81 81 82 82 0 - Download Tea4CUPS from : 83 83 84 84 http://www.librelogiciel.com/software/Tea4CUPS/action_Presentation 85 86 and extract it : 87 85 86 and extract it : 87 88 88 $ tar -zxf tea4cups-x.yy.tar.gz 89 89 90 90 where x.yy is Tea4CUPS' version number. 91 92 1 - Copy the 'tea4cups' command into CUPS' backend directory, 91 92 1 - Copy the 'tea4cups' command into CUPS' backend directory, 93 93 for example : 94 94 95 95 $ cp tea4cups /usr/lib/cups/backend 96 96 97 97 2 - Restart CUPS in order for this new backend to be detected. 98 98 NB : For this to work you need CUPS 1.1.15 or higher. 99 99 You can use Tea4CUPS with older versions if you want, but 100 100 without autodetection. 101 102 3 - Either from CUPS' web interface, add new printers with 101 102 3 - Either from CUPS' web interface, add new printers with 103 103 'Tea4CUPS managed' in front of the device's name. 104 105 Or by directly modifying CUPS' printers.conf file, prepend 104 105 Or by directly modifying CUPS' printers.conf file, prepend 106 106 each DeviceURI value with 'tea4cups://', and restart CUPS. 107 107 (Use this last method if autodetection doesn't work because 108 108 the version of CUPS you use is too old) 109 110 4 - Copy tea4cups.conf into CUPS' configuration directory (where 109 110 4 - Copy tea4cups.conf into CUPS' configuration directory (where 111 111 cupsd.conf resides) : 112 112 113 113 $ cp tea4cups.conf /etc/cups/ 114 115 5 - Modify tea4cups.conf to suit your needs. Several examples 114 115 5 - Modify tea4cups.conf to suit your needs. Several examples 116 116 are included. 117 118 6 - There's no 6 ! 119 117 118 6 - There's no 6 ! 119 120 120 ============================================================================= 121 121 122 Troubleshooting : 122 Troubleshooting : 123 123 ----------------- 124 124 125 125 1 - Set "LogLevel debug2" in CUPS' cupsd.conf 126 126 127 127 2 - Restart CUPS. 128 128 129 129 3 - Set "debug: yes" in the [global] section of tea4cups.conf 130 130 131 131 4 - Print something on a print queue managed 132 132 by Tea4CUPS. 133 133 134 134 5 - Look at CUPS' error_log file for diagnostic and error messages. 135 135 136 136 ============================================================================= 137 137 138 CUPS (Common UNIX(r) Printing System) is trademark property of Easy Software 138 CUPS (Common UNIX(r) Printing System) is trademark property of Easy Software 139 139 Products. 140 140 … … 144 144 145 145 ============================================================================= 146 146 147 147 Please e-mail bugs to : alet@librelogiciel.com (Jerome Alet) -
tea4cups/trunk/tea4cups.conf
r644 r645 9 9 # the Free Software Foundation; either version 2 of the License, or 10 10 # (at your option) any later version. 11 # 11 # 12 12 # This program is distributed in the hope that it will be useful, 13 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 15 # GNU General Public License for more details. 16 # 16 # 17 17 # You should have received a copy of the GNU General Public License 18 18 # along with this program; if not, write to the Free Software 19 19 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 # 20 # 21 21 # 22 22 … … 50 50 # parallel. 51 51 # 52 # NB : in any case, hooks' names are sorted alphabetically and 52 # NB : in any case, hooks' names are sorted alphabetically and 53 53 # are launched in this sort order (obviously when launched in parallel 54 54 # this is unnoticeable). 55 # 55 # 56 56 # Can be set either in the [global] section or any print queue section. 57 57 # The value defined in a print queue section takes precedence over the … … 59 59 # serialize : yes 60 60 61 # When executing the contents of a prehook or posthook directive, 61 # When executing the contents of a prehook or posthook directive, 62 62 # tea4cups makes the following environment variables available to your 63 63 # own commands : … … 82 82 # job's datas. Don't rely on TEAINPUTFILE, use TEADATAFILE instead 83 83 # since the first one may be empty depending on your printer driver. 84 84 85 85 # Some hooks : prehooks and posthooks 86 86 # 87 # Prehooks are guaranteed to be launched 88 # BEFORE the job's datas are sent to the printer, and 87 # Prehooks are guaranteed to be launched 88 # BEFORE the job's datas are sent to the printer, and 89 89 # posthooks are guaranteed to be launched AFTER the job's 90 90 # datas have been sent to the printer. … … 99 99 # in the CUPS backend which handles the transmission of the job 100 100 # to the printer. 101 # 101 # 102 102 # prehook_0 : echo "Your print job has been accepted" | smbclient -M $TEAUSERNAME 103 103 # posthook_0 : echo "Your print job has been printed with status $TEASTATUS" | smbclient -M $TEAUSERNAME 104 104 # 105 # NB : as a special feature, any prehook which exits with a -1 status (255) 105 # NB : as a special feature, any prehook which exits with a -1 status (255) 106 106 # causes the job to NOT be sent to the real backend, effectively cancelling it. 107 # None of the posthooks gets executed in this case, but all 107 # None of the posthooks gets executed in this case, but all 108 108 # remaining prehooks are still executed. 109 # 109 # 110 110 #prehook_pdf : cat $TEADATAFILE | su -c "lp -dPDFGenerator" $TEAUSERNAME 111 111 #posthook_0 : cat $TEADATAFILE >/tmp/$TEAJOBID.prn … … 123 123 # An empty value deletes a value defined in the [global] section 124 124 # so this particular hook doesn't get executed on this printer. 125 #prehook_pdf : 125 #prehook_pdf : 126 126 127 127 # A reflector which produces 4 copies each time : 128 #posthook_4copies : lp -dotherprinter -n4 $CUPSDATAFILE 128 #posthook_4copies : lp -dotherprinter -n4 $CUPSDATAFILE 129 129 130 # A simple accounting mechanism 130 # A simple accounting mechanism 131 131 #prehook_accounting : echo $TEAPRINTERNAME $TEAJOBID $TEAUSERNAME $TEABILLING `pkpgcounter $TEADATAFILE` >/var/log/printaccounting.log 132 132 133 133 # Some additionnal hooks to forbid duplicate jobs : 134 134 # The prehook will use the history file to filter out duplicate jobs 135 # checkdupes is an hypothetical command which exits -1 if the current print 135 # checkdupes is an hypothetical command which exits -1 if the current print 136 136 # job is a duplicate (same MD5 sum already found in history) 137 137 #prehook_to_filter_duplicates : /usr/local/bin/checkdupes $TEAMD5SUM /tmp/jobmd5sums