root / tea4cups / trunk / tea4cups.conf @ 612

Revision 612, 5.5 kB (checked in by jerome, 19 years ago)

Added copyright notices

  • Property svn:keywords set to Auth Date Id Rev
Line 
1# $Id$
2#
3# Tea4CUPS : Tee for CUPS
4#
5# (c) 2005 Jerome Alet <alet@librelogiciel.com>
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
18# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
19#
20#
21
22# First we set all top-level directives in the [global] section
23[global]
24
25# Should we log debugging information to CUPS' error_log file ?
26# defaults to No if unset.
27debug : yes
28
29# In which directory will we create our files ? It must already exist !
30# This directive MUST be present since there's no sane default value.
31# Can be set either in the [global] section or any print queue section.
32# The value defined in a print queue section takes precedence over the
33# value defined in the [global] section.
34# directory : /var/spool/tea4cups/
35directory : /var/spool/cups/
36
37# Should Tea4CUPS keep the files it creates once all tees have ended ?
38# Defaults to No if unset, meaning that files are automatically deleted
39# once all tees have ended.
40# Can be set either in the [global] section or any print queue section.
41# The value defined in a print queue section takes precedence over the
42# value defined in the [global] section.
43# BEWARE : this may use huge amounts of disk space !
44# keepfiles : yes
45
46# Should we serialize the launch of all tees : launch one tee after
47# the other to save some system resources.
48# Defaults to No if unset, meaning that all tees (or hooks) are launched in
49# parallel.
50#
51# NB : in any case, hooks or tees names are sorted alphabetically and
52# are launched in this sort order (obviously when launched in parallel
53# this is unnoticeable).
54#
55# Can be set either in the [global] section or any print queue section.
56# The value defined in a print queue section takes precedence over the
57# value defined in the [global] section.
58# This value also applies to prehooks and posthooks (see below)
59# serialize : yes
60
61# When executing the contents of a tee, prehook or posthook directive,
62# tea4cups makes the following environment variables available to your
63# own commands :
64#
65# TEAPRINTERNAME : The print queue name.
66# TEADIRECTORY : Tea4CUPS output directory.
67# TEADATAFILE : Full name of Tea4CUPS work file (in $TEADIRECTORY).
68# TEAJOBSIZE : Job's size in bytes.
69# TEAMD5SUM : MD5 sum of the job's datas.
70# TEACLIENTHOST : Client's hostname or IP address.
71# TEAJOBID : Job's Id.
72# TEAUSERNAME : Name of the user who launched the print job.
73# TEATITLE : Job's title.
74# TEACOPIES : Number of copies requested.
75# TEAOPTIONS : Options of the print job.
76# TEAINPUTFILE : Print job's data file or empty when job read from stdin.
77#
78# Your own commands will mostly be interested in TEADATAFILE which is
79# the name of the file from which your commands may extract the final
80# job's datas.
81       
82# Now defines some default tees which will always be launched
83# at the same time that the job's datas are being sent to the
84# printer.
85# The tee names are completely free BUT THEY MUST BEGIN WITH 'tee_'
86#
87# These are just some stupid examples.
88#tee_0 : cat $TEADATAFILE >/tmp/$TEAJOBID.prn
89#tee_pdf : cat $TEADATAFILE | su -c "lp -dPDFGenerator" $TEAUSERNAME
90
91# Some hooks : prehooks and posthooks
92#
93# Contrary to tees, prehooks are guaranteed to be launched
94# BEFORE the job's datas are sent to the printer, and
95# posthooks are guaranteed to be launched AFTER the job's
96# datas have been sent to the printer.
97#
98# prehook names are completely free BUT THEY MUST BEGIN WITH 'prehook_'
99# posthook names are completely free BUT THEY MUST BEGIN WITH 'posthook_'
100#
101# An additionnal environment variable is made available to posthooks,
102# named TEASTATUS which contains the exitcode of the real CUPS backend.
103# The normal value is 0, meaning that the real CUPS backend exited
104# successfully. Any other value indicates that a problem occured
105# in the CUPS backend which handles the transmission of the job
106# to the printer.
107#
108# prehook_0 : echo "Your print job has been accepted" | smbclient -M $TEAUSERNAME
109# posthook_0 : echo "Your print job has been printed with status $TEASTATUS" | smbclient -M $TEAUSERNAME
110#
111# NB : as a special feature, any prehook which exits with a -1 status (255)
112# causes the job to NOT be sent to the real backend, effectively cancelling it.
113# None of the tees and posthooks gets executed in this case, but all
114# remaining prehooks are still executed.
115#
116
117
118# Sample section for print queue HP2100
119# Uncomment and adapt to your needs.
120#
121#[HP2100]
122#
123# By using a same tee name as in the [global] section, the new
124# value takes precedence
125#tee_0 : cat $TEADATAFILE >~$TEAUSERNAME/savejobs/$TEAJOBID.prn
126
127# An empty value deletes a value defined in the [global] section
128# so this particular tee doesn't get executed.
129#tee_pdf :
130
131# A reflector which produces 4 copies each time :
132#tee_4copies : lp -dotherprinter -n4 $CUPSDATAFILE
133
134# A simple accounting mechanism
135#tee_accounting : echo $TEAPRINTERNAME $TEAJOBID $TEAUSERNAME `pkpgcounter $TEADATAFILE` >/var/log/printaccounting.log
136
137# An additionnal posthook :
138#posthook_dummy : echo "$TEAJOBID : $TEAMD5SUM" >>/tmp/jobmd5sums
Note: See TracBrowser for help on using the browser.