Changeset 3413 for pykota/trunk/docs/filterpykota.sgml
- Timestamp:
- 09/27/08 22:02:37 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/docs/filterpykota.sgml
r2835 r3413 3 3 <chapter> 4 4 <title id="filter">PyKota's internals</title> 5 5 6 6 <para>Last modified on $Date: 2005-03-06 17:52:43 +0100 (dim, 06 mar 2005) $</para> 7 7 8 8 <para> 9 To account for pages or eventually ink usage 9 To account for pages or eventually ink usage 10 10 <footnote> 11 11 <para> 12 12 PyKota doesn't currently account for ink usage, it only accounts 13 13 pages. To account for ink usage, you should use PrintBill instead for now. 14 </para> 15 </footnote> 14 </para> 15 </footnote> 16 16 , you must plug your accounting 17 17 system somewhere into the printing system you use. One way to do this without having 18 18 to modify the printing system itself, is by using a <firstterm>filter</firstterm>. 19 19 </para> 20 20 21 21 <para> 22 22 A filter is a computer program which takes data in one format as its input, and outputs the 23 23 same data but transformed into another format. <application>CUPS</application> already 24 contains many filters. For example there's one filter named <command>pstops</command> which accepts 24 contains many filters. For example there's one filter named <command>pstops</command> which accepts 25 25 PostScript data as its input, and, as its name implies, outputs PostScript data too, but after having 26 26 eventually rearranged the pages to fit several pages on a single sheet of paper, or other manipulations 27 27 like that. 28 28 </para> 29 29 30 30 <para> 31 31 The <command>pstops</command> filter described above is also in charge of doing basic page … … 33 33 prove to be unreliable depending on the drivers used or if a paper jam occurs for example. 34 34 </para> 35 35 36 36 <para> 37 37 So to do its own accounting, <application>PyKota</application> has its own filters, for <application>CUPS</application> 38 38 it's named <command>cupspykota</command>, which is in fact a <application>CUPS</application> backends wrapper. 39 The procedure to plug the correct filter into your printing system is described in the 39 The procedure to plug the correct filter into your printing system is described in the 40 40 <xref linkend="installation" endterm="installation"> chapter. 41 41 </para> 42 42 43 43 <para> 44 44 Currently with <application>CUPS</application>' internal accounting mechanism, the <command>pstops</command> … … 48 48 print job will be correctly accounted for. 49 49 </para> 50 50 51 51 <para> 52 52 When using the <literal>hardware</literal> accounting method, 53 53 <application>PyKota</application> launches the script you specified to 54 54 ask the printer for its internal page counter at the start and at the end of the print job, and 55 computes the values' difference to know the job's size. 55 computes the values' difference to know the job's size. 56 56 </para> 57 57 58 58 <para> 59 59 When using the <literal>software</literal> accounting method, 60 the command you specified is launched with the job's data on its 60 the command you specified is launched with the job's data on its 61 61 standard input. Your command must print the job's size in number of 62 62 pages on a single line on its standard output. This number is then 63 63 read by <application>PyKota</application> and used to update the current user's quota information. 64 64 </para> 65 65 66 66 <para> 67 67 If a problem occurs, it is logged either to the filter's standard error or to the system logger, depending on … … 71 71 messages if you want. 72 72 </para> 73 73 74 74 </chapter> 75 75