Changeset 645 for tea4cups

Show
Ignore:
Timestamp:
06/12/05 23:07:29 (19 years ago)
Author:
jerome
Message:

Deleted trailing spaces as suggested by Peter

Location:
tea4cups/trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • tea4cups/trunk/CREDITS

    r644 r645  
    2626  The following people supports the Tea4CUPS project enhancement 
    2727  by funding it : 
    28    
     28 
    2929  - Anwar Bashir - University of Teesside 
    30    
     30 
    3131Contributors : 
    3232-------------- 
    3333 
    3434  The following people contributed to the Tea4CUPS project : 
    35    
     35 
    3636  - Peter Stuge : rewrote most of the subprocess management stuff. 
    3737 
     
    4141  THINK YOU DESERVE TO BE LISTED, JUST SEND ME AN EMAIL 
    4242  ASKING FOR BEING INCLUDED. 
    43    
     43 
    4444  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 
    4747  IS YOUR RIGHT TO DO SO TOO, JUST TELL ME. 
    48    
     48 
    4949============================================================== 
  • tea4cups/trunk/NEWS

    r644 r645  
    2121 
    2222Tea4CUPS News : 
    23     
     23 
    2424  * 2.12alpha : 
    25    
     25 
    2626    - Greatly improved the IPP parser. 
    27      
     27 
    2828    - When printing test pages from CUPS' web interface, the empty username 
    2929      is now overwritten with the username CUPS is running as. 
    30      
     30 
    3131  * 2.11 : 
    32    
     32 
    3333    - Now works with old releases of Python (>= 2.1) 
    34      
     34 
    3535    - 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 
    3838      successfully printed so no need to stop the print queue. 
    3939      We log a warning instead in this case. 
    40        
    41   * 2.10 :  
    42    
     40 
     41  * 2.10 : 
     42 
    4343    - Makes the IPP message filename and the Job's billing code available. 
    44      
     44 
    4545  * 2.00 : 
    4646 
    4747    - Introduces the notions of pre and post hooks. 
    48      
     48 
    4949    - Prehooks can decide to entirely cancel the print job if needed. 
    5050 
  • tea4cups/trunk/README

    r644 r645  
    3030printers at the same time, which is not possible with CUPS. 
    3131 
    32 Another possibility would be for example to send the same document to  
     32Another possibility would be for example to send the same document to 
    3333a printer, a PDF generator, a Fax, and as an attachment to an email 
    3434message, all of this by printing it a single time. 
    3535 
    36 Tea4CUPS allows this by permitting you to easily plug your own  
    37 commands into the very last stage of CUPS' filtering chain.  
     36Tea4CUPS allows this by permitting you to easily plug your own 
     37commands into the very last stage of CUPS' filtering chain. 
    3838 
    3939Tea4CUPS provides two ways to launch commands : 
    4040 
    41         - prehooks : these are guaranteed to be launched before the  
     41        - prehooks : these are guaranteed to be launched before the 
    4242                     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 
    4444                     print job. 
    45                       
     45 
    4646        - posthooks : these are guaranteed to be launched after the 
    4747                      print job has been sent to the real printer, 
    4848                      unless the job was previously cancelled by a 
    4949                      prehook. 
    50                   
     50 
    5151To help your own commands, Tea4CUPS makes available as part of the 
    5252environment several variables which can be used from the 
     
    6767        TEABILLING : Job's billing code (lp -o job-billing=SomeCode file.ps) 
    6868        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 
    7070                    posthooks, obviously. 
    71          
    72 In the case you want to use both Tea4CUPS and PyKota, you MUST install  
     71 
     72In the case you want to use both Tea4CUPS and PyKota, you MUST install 
    7373PyKota v1.22alpha2 or higher to avoid a race condition. 
    7474 
     
    8181 
    8282  0 - Download Tea4CUPS from : 
    83    
     83 
    8484        http://www.librelogiciel.com/software/Tea4CUPS/action_Presentation 
    85          
    86       and extract it :   
    87        
     85 
     86      and extract it : 
     87 
    8888        $ tar -zxf tea4cups-x.yy.tar.gz 
    89          
     89 
    9090        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, 
    9393      for example : 
    94        
     94 
    9595        $ cp tea4cups /usr/lib/cups/backend 
    96          
     96 
    9797  2 - Restart CUPS in order for this new backend to be detected. 
    9898      NB : For this to work you need CUPS 1.1.15 or higher. 
    9999      You can use Tea4CUPS with older versions if you want, but 
    100100      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 
    103103      '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 
    106106      each DeviceURI value with 'tea4cups://', and restart CUPS. 
    107107      (Use this last method if autodetection doesn't work because 
    108108      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 
    111111      cupsd.conf resides) : 
    112        
     112 
    113113        $ 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 
    116116      are included. 
    117        
    118   6 - There's no 6 !     
    119    
     117 
     118  6 - There's no 6 ! 
     119 
    120120============================================================================= 
    121121 
    122 Troubleshooting :  
     122Troubleshooting : 
    123123----------------- 
    124124 
    125125  1 - Set "LogLevel debug2" in CUPS' cupsd.conf 
    126    
     126 
    127127  2 - Restart CUPS. 
    128    
     128 
    129129  3 - Set "debug: yes" in the [global] section of tea4cups.conf 
    130    
     130 
    131131  4 - Print something on a print queue managed 
    132132      by Tea4CUPS. 
    133        
     133 
    134134  5 - Look at CUPS' error_log file for diagnostic and error messages. 
    135    
     135 
    136136============================================================================= 
    137137 
    138 CUPS (Common UNIX(r) Printing System) is trademark property of Easy Software  
     138CUPS (Common UNIX(r) Printing System) is trademark property of Easy Software 
    139139Products. 
    140140 
     
    144144 
    145145============================================================================= 
    146      
     146 
    147147Please e-mail bugs to : alet@librelogiciel.com (Jerome Alet) 
  • tea4cups/trunk/tea4cups.conf

    r644 r645  
    99# the Free Software Foundation; either version 2 of the License, or 
    1010# (at your option) any later version. 
    11 #  
     11# 
    1212# This program is distributed in the hope that it will be useful, 
    1313# but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1414# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1515# GNU General Public License for more details. 
    16 #  
     16# 
    1717# You should have received a copy of the GNU General Public License 
    1818# along with this program; if not, write to the Free Software 
    1919# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 
    20 #  
     20# 
    2121# 
    2222 
     
    5050# parallel. 
    5151# 
    52 # NB : in any case, hooks' names are sorted alphabetically and  
     52# NB : in any case, hooks' names are sorted alphabetically and 
    5353# are launched in this sort order (obviously when launched in parallel 
    5454# this is unnoticeable). 
    55 #  
     55# 
    5656# Can be set either in the [global] section or any print queue section. 
    5757# The value defined in a print queue section takes precedence over the 
     
    5959# serialize : yes 
    6060 
    61 # When executing the contents of a prehook or posthook directive,  
     61# When executing the contents of a prehook or posthook directive, 
    6262# tea4cups makes the following environment variables available to your 
    6363# own commands : 
     
    8282# job's datas. Don't rely on TEAINPUTFILE, use TEADATAFILE instead 
    8383# since the first one may be empty depending on your printer driver. 
    84          
     84 
    8585# Some hooks : prehooks and posthooks 
    8686# 
    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 
    8989# posthooks are guaranteed to be launched AFTER the job's 
    9090# datas have been sent to the printer. 
     
    9999# in the CUPS backend which handles the transmission of the job 
    100100# to the printer. 
    101 #  
     101# 
    102102# prehook_0 : echo "Your print job has been accepted" | smbclient -M $TEAUSERNAME 
    103103# posthook_0 : echo "Your print job has been printed with status $TEASTATUS" | smbclient -M $TEAUSERNAME 
    104104# 
    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) 
    106106# 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 
    108108# remaining prehooks are still executed. 
    109 #  
     109# 
    110110#prehook_pdf : cat $TEADATAFILE | su -c "lp -dPDFGenerator" $TEAUSERNAME 
    111111#posthook_0 : cat $TEADATAFILE >/tmp/$TEAJOBID.prn 
     
    123123# An empty value deletes a value defined in the [global] section 
    124124# so this particular hook doesn't get executed on this printer. 
    125 #prehook_pdf :  
     125#prehook_pdf : 
    126126 
    127127# A reflector which produces 4 copies each time : 
    128 #posthook_4copies : lp -dotherprinter -n4 $CUPSDATAFILE  
     128#posthook_4copies : lp -dotherprinter -n4 $CUPSDATAFILE 
    129129 
    130 # A simple accounting mechanism  
     130# A simple accounting mechanism 
    131131#prehook_accounting : echo $TEAPRINTERNAME $TEAJOBID $TEAUSERNAME $TEABILLING `pkpgcounter $TEADATAFILE` >/var/log/printaccounting.log 
    132132 
    133133# Some additionnal hooks to forbid duplicate jobs : 
    134134# 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 
    136136# job is a duplicate (same MD5 sum already found in history) 
    137137#prehook_to_filter_duplicates : /usr/local/bin/checkdupes $TEAMD5SUM /tmp/jobmd5sums