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

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
RevLine 
[1103]1<!-- $Id$ -->
[1099]2
3<chapter>
[2115]4  <title id="pykotme">Get print quotes before printing for real with <command>pykotme</command></title>
[1099]5  <para>Last modified on $Date$</para>
[3413]6
[1099]7  <para>
[2115]8    PyKota features a print quote generator, named <command>pykotme</command>.
[1099]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>
[3413]14
[1099]15  <para>
[2115]16    To get a print quote, you have to launch <command>pykotme</command>
[2233]17    from the command line, passing your print job's content in any format
[3413]18    recognized by PyKota
[2909]19    <footnote><para>PyKota now uses <ulink url="http://www.pykota.com/software/pkpgcounter">pkpgcounter</ulink>
[2381]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.
[2233]22    </para></footnote>, either in the form of one or more file names on the command line,
[1099]23    or on its standard input (i.e. in a shell pipe or redirection).
24  </para>
[3413]25
[1099]26  <para>
[2115]27    Without any command line argument, <command>pykotme</command>
[1099]28    automatically reads your job's data from its standard input.
29  </para>
[3413]30
[1099]31  <para>
[2115]32    By default, <command>pykotme</command>
[1099]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.
[1166]37    You can pass more than one printer name wildcard, separating
38    them with commas.
[1099]39  </para>
[3413]40
[2233]41  <para>
42    <command>pykotme</command>'s functionnality is also available through the
[2551]43    use of the <command>pykotme.cgi</command> <acronym>CGI</acronym> script.
44    However without authentication <command>pykotme.cgi</command> will only
[2233]45    return the print job's size and not its cost, because the cost depends on
[3413]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
[2233]49    with the command line tool, you must configure your web server to force
[2551]50    users to authenticate whevenver they access to <command>pykotme.cgi</command>.
[3413]51    Then they will be able to choose one or more printers (all by default),
[2381]52    and also to enter their username,
53    and the exact cost of the print job will be computed.
[2233]54  </para>
[3413]55
[1099]56  <sect1>
57    <title>Examples</title>
58    <para>
[2115]59      Here are some examples of <command>pykotme</command> usage.
[1099]60    </para>
[3413]61
[1099]62    <para>
63      The simplest form :
[3413]64<screen>
[1099]65port50-2:~$ pykotme pykota.ps
66Your account balance : 16.25
67Job size : 22 pages
68Cost on printer apple : 1.35
[3413]69port50-2:~$
70</screen>
[1099]71    </para>
[3413]72
[1099]73    <para>
74      More complex, with printer name wildcard and within a pipe :
[3413]75<screen>
[1099]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
[3413]82port50-2:~$
[1099]83</screen>
84    </para>
85  </sect1>
[3413]86
[1101]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>
[3413]97        </group>
[1101]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>
[3413]103        </group>
[1101]104      </cmdsynopsis>
105    </para>
106  </sect1>
[1099]107</chapter>
108
Note: See TracBrowser for help on using the browser.