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

Revision 3413, 3.9 kB (checked in by jerome, 16 years ago)

Removed unnecessary spaces at EOL.

  • 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 now uses <ulink url="http://www.pykota.com/software/pkpgcounter">pkpgcounter</ulink>
20    which recognizes PostScript (both binary and DSC compliant),
21    PCLXL (aka PCL6), PDF, PCL3/4/5, ESC/P2, TIFF, DVI, OpenOffice Writer, and OpenOffice Impress.
22    </para></footnote>, either in the form of one or more file names on the command line,
23    or on its standard input (i.e. in a shell pipe or redirection).
24  </para>
25
26  <para>
27    Without any command line argument, <command>pykotme</command>
28    automatically reads your job's data from its standard input.
29  </para>
30
31  <para>
32    By default, <command>pykotme</command>
33    will display a quote for your job on all printers. You can restrict
34    this by using the <literal>-p | --printer</literal> command line
35    option followed with either a printer's name or a wildcard
36    which will be used to search all printers which name matches.
37    You can pass more than one printer name wildcard, separating
38    them with commas.
39  </para>
40
41  <para>
42    <command>pykotme</command>'s functionnality is also available through the
43    use of the <command>pykotme.cgi</command> <acronym>CGI</acronym> script.
44    However without authentication <command>pykotme.cgi</command> will only
45    return the print job's size and not its cost, because the cost depends on
46    the value of the user's overcharging factor and the printer being used.
47    That's why if you want to
48    obtain the same functionnality with the <acronym>CGI</acronym> script than
49    with the command line tool, you must configure your web server to force
50    users to authenticate whevenver they access to <command>pykotme.cgi</command>.
51    Then they will be able to choose one or more printers (all by default),
52    and also to enter their username,
53    and the exact cost of the print job will be computed.
54  </para>
55
56  <sect1>
57    <title>Examples</title>
58    <para>
59      Here are some examples of <command>pykotme</command> usage.
60    </para>
61
62    <para>
63      The simplest form :
64<screen>
65port50-2:~$ pykotme pykota.ps
66Your account balance : 16.25
67Job size : 22 pages
68Cost on printer apple : 1.35
69port50-2:~$
70</screen>
71    </para>
72
73    <para>
74      More complex, with printer name wildcard and within a pipe :
75<screen>
76port50-2:~$ a2ps -o - pykota/README | pykotme --printer "a*"
77[pykota/README (plain): 6 pages on 3 sheets]
78[Total: 6 pages on 3 sheets] sent to the standard output
79Your account balance : 16.25
80Job size : 3 pages
81Cost on printer apple : 0.40
82port50-2:~$
83</screen>
84    </para>
85  </sect1>
86
87  <sect1>
88    <title>Reference</title>
89    <para>
90      <cmdsynopsis>
91        <command>pykotme</command>
92        <group choice="opt"><arg>-v</arg><arg>--version</arg></group>
93        <group choice="opt"><arg>-h</arg><arg>--help</arg></group>
94        <group choice="opt">
95          <arg>-P <replaceable>printername</replaceable></arg>
96          <arg>--printer <replaceable>printername</replaceable></arg>
97        </group>
98        <group choice="opt">
99          <arg><replaceable>filename1</replaceable></arg>
100          <arg><replaceable>filename2</replaceable></arg>
101          <arg><replaceable>...</replaceable></arg>
102          <arg><replaceable>filenameN</replaceable></arg>
103        </group>
104      </cmdsynopsis>
105    </para>
106  </sect1>
107</chapter>
108
Note: See TracBrowser for help on using the browser.