root / pykota / trunk / docs / pykotme.sgml @ 2233

Revision 2233, 3.6 kB (checked in by jerome, 19 years ago)

Added some info about pykotme.cgi

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1<!-- $Id$ -->
2
3<chapter>
4  <title id="pykotme">Get print quotes before printing for real with <command>pykotme</command></title>
5  <para>Last modified on $Date$</para>
6 
7  <para>
8    PyKota features a print quote generator, named <command>pykotme</command>.
9    This command line tool can be used to learn in advance how much a print job
10    will cost to you if you really send it to a printer.
11    You can then decide if printing your document is a good idea or not, and do it
12    knowingly.
13  </para>
14 
15  <para>
16    To get a print quote, you have to launch <command>pykotme</command>
17    from the command line, passing your print job's content in any format
18    recognized by PyKota
19    <footnote><para>PyKota currently recognizes PostScript (both binary and DSC compliant),
20    PCLXL (aka PCL6), PDF, PCL3/4/5, and ESC/P2
21    </para></footnote>, either in the form of one or more file names on the command line,
22    or on its standard input (i.e. in a shell pipe or redirection).
23  </para>
24 
25  <para>
26    Without any command line argument, <command>pykotme</command>
27    automatically reads your job's data from its standard input.
28  </para>
29 
30  <para>
31    By default, <command>pykotme</command>
32    will display a quote for your job on all printers. You can restrict
33    this by using the <literal>-p | --printer</literal> command line
34    option followed with either a printer's name or a wildcard
35    which will be used to search all printers which name matches.
36    You can pass more than one printer name wildcard, separating
37    them with commas.
38  </para>
39 
40  <para>
41    <command>pykotme</command>'s functionnality is also available through the
42    use of the <filename>pykotme.cgi</filename> <acronym>CGI</acronym> script.
43    However without authentication <filename>pykotme.cgi</filename> will only
44    return the print job's size and not its cost, because the cost depends on
45    the value of the user's overcharging factor. That's why if you want to
46    obtain the same functionnality with the <acronym>CGI</acronym> script than
47    with the command line tool, you must configure your web server to force
48    users to authenticate whevenver they access to <filename>pykotme.cgi</filename>.
49  </para>
50 
51  <sect1>
52    <title>Examples</title>
53    <para>
54      Here are some examples of <command>pykotme</command> usage.
55    </para>
56   
57    <para>
58      The simplest form :
59<screen>    
60port50-2:~$ pykotme pykota.ps
61Your account balance : 16.25
62Job size : 22 pages
63Cost on printer apple : 1.35
64port50-2:~$
65</screen>   
66    </para>
67   
68    <para>
69      More complex, with printer name wildcard and within a pipe :
70<screen>      
71port50-2:~$ a2ps -o - pykota/README | pykotme --printer "a*"
72[pykota/README (plain): 6 pages on 3 sheets]
73[Total: 6 pages on 3 sheets] sent to the standard output
74Your account balance : 16.25
75Job size : 3 pages
76Cost on printer apple : 0.40
77port50-2:~$
78</screen>
79    </para>
80  </sect1>
81 
82  <sect1>
83    <title>Reference</title>
84    <para>
85      <cmdsynopsis>
86        <command>pykotme</command>
87        <group choice="opt"><arg>-v</arg><arg>--version</arg></group>
88        <group choice="opt"><arg>-h</arg><arg>--help</arg></group>
89        <group choice="opt">
90          <arg>-P <replaceable>printername</replaceable></arg>
91          <arg>--printer <replaceable>printername</replaceable></arg>
92        </group> 
93        <group choice="opt">
94          <arg><replaceable>filename1</replaceable></arg>
95          <arg><replaceable>filename2</replaceable></arg>
96          <arg><replaceable>...</replaceable></arg>
97          <arg><replaceable>filenameN</replaceable></arg>
98        </group> 
99      </cmdsynopsis>
100    </para>
101  </sect1>
102</chapter>
103
Note: See TracBrowser for help on using the browser.