Index: /pykota/trunk/docs/edpykota.sgml
===================================================================
--- /pykota/trunk/docs/edpykota.sgml (revision 1782)
+++ /pykota/trunk/docs/edpykota.sgml (revision 2115)
@@ -6,5 +6,5 @@
   
   <para>
-    <application>edpykota</application> is the command line tool with which you will 
+    <command>edpykota</command> is the command line tool with which you will 
     maintain your print quota database.
   </para>
@@ -16,5 +16,5 @@
       <listitem>
         <para>
-          Add printers (it's preferable to use the <application>pkprinters</application> command for this though) ;
+          Add printers (it's preferable to use the <command>pkprinters</command> command for this though) ;
         </para>
       </listitem>
Index: /pykota/trunk/docs/pykotme.sgml
===================================================================
--- /pykota/trunk/docs/pykotme.sgml (revision 1166)
+++ /pykota/trunk/docs/pykotme.sgml (revision 2115)
@@ -2,9 +2,9 @@
 
 <chapter>
-  <title id="pykotme">Get print quotes before printing for real with <application>pykotme</application></title>
+  <title id="pykotme">Get print quotes before printing for real with <command>pykotme</command></title>
   <para>Last modified on $Date$</para>
   
   <para>
-    PyKota features a print quote generator, named <application>pykotme</application>.
+    PyKota features a print quote generator, named <command>pykotme</command>.
     This command line tool can be used to learn in advance how much a print job
     will cost to you if you really send it to a printer.
@@ -14,5 +14,5 @@
   
   <para>
-    To get a print quote, you have to launch <application>pykotme</application>
+    To get a print quote, you have to launch <command>pykotme</command>
     from the command line, passing your print job's content in the PostScript
     format, either in the form of one or more file names on the command line,
@@ -21,10 +21,10 @@
   
   <para>
-    Without any command line argument, <application>pykotme</application>
+    Without any command line argument, <command>pykotme</command>
     automatically reads your job's data from its standard input.
   </para>
   
   <para>
-    By default, <application>pykotme</application>
+    By default, <command>pykotme</command>
     will display a quote for your job on all printers. You can restrict
     this by using the <literal>-p | --printer</literal> command line
@@ -38,5 +38,5 @@
     <title>Examples</title>
     <para>
-      Here are some examples of <application>pykotme</application> usage.
+      Here are some examples of <command>pykotme</command> usage.
     </para>
     
@@ -91,4 +91,10 @@
 
 $Log$
+Revision 1.6  2005/02/28 00:07:37  jalet
+Added pkmail's doc.
+Used the <command> tag instead of <application> for commands.
+Fixed some typos.
+Added some missing command line options in the commands reference.
+
 Revision 1.5  2003/10/12 20:47:51  jalet
 Doc enhanced.
Index: /pykota/trunk/docs/repykota.sgml
===================================================================
--- /pykota/trunk/docs/repykota.sgml (revision 1783)
+++ /pykota/trunk/docs/repykota.sgml (revision 2115)
@@ -15,10 +15,10 @@
     
     <para>
-      PyKota features a quota report generator, named <application>repykota</application>,
+      PyKota features a quota report generator, named <command>repykota</command>,
       with which you can print the current state of the quota database.
     </para>
     
     <para>
-      <application>repykota</application> behaves differently when it is launched by a
+      <command>repykota</command> behaves differently when it is launched by a
       <application>PyKota</application> administrator, compared to when it is launched by a normal user.
     </para>  
@@ -32,5 +32,5 @@
     
     <para>
-      In the second case, i.e. when <application>repykota</application> is launched by
+      In the second case, i.e. when <command>repykota</command> is launched by
       a normal user, the user will only be allowed to see informations about himself or 
       the groups he his a member of.
@@ -45,5 +45,5 @@
     
     <para>
-      Launching <application>repykota</application> with no arguments will generate
+      Launching <command>repykota</command> with no arguments will generate
       a complete print quota report, depending on what you are allowed to see.
     </para>
@@ -118,8 +118,8 @@
       If you install the CGI script as described above, any user will be allowed to view the complete print
       quota report, for all users, groups and printers. This is then a different behavior compared to when
-      a normal user wants a print quota report from the command line through <application>repykota</application>.
-      If you find this disturbing, then the best is to ask for user authentication whenever the <application>printquota.cgi</application>
+      a normal user wants a print quota report from the command line through <command>repykota</command>.
+      If you find this disturbing, then the best is to ask for user authentication whenever the <command>printquota.cgi</command>
       CGI script is accessed. This CGI script will then automatically behave as expected, showing in the print quota
-      report only what the authenticated user is allowed to see, just like when he launches <application>repykota</application>
+      report only what the authenticated user is allowed to see, just like when he launches <command>repykota</command>
       from the command line. As a special case, if the user authenticates using the <literal>root</literal> username,
       then there's no restriction on what may appear on the print quota report.
@@ -129,6 +129,6 @@
       To automatically ask for an authentication dialog whenever the CGI script is accessed, you have to configure
       your web server to do so. If your webserver is <ulink url="http://httpd.apache.org"><application>Apache</application></ulink>, then it's relatively easy. First you have to put 
-      <application>printquota.cgi</application> in its own subdirectory below your web server's <filename>cgi-bin</filename>
-      directory, for example in <filename>cgi-bin/PyKota/</filename>. Then use the <application>htpasswd</application>
+      <command>printquota.cgi</command> in its own subdirectory below your web server's <filename>cgi-bin</filename>
+      directory, for example in <filename>cgi-bin/PyKota/</filename>. Then use the <command>htpasswd</command>
       command line tool to create a file which contains usernames and passwords for all your users allowed to see
       the print quota report from a web browser, and put this file outside of the directories served by <application>Apache</application>
@@ -152,4 +152,10 @@
 
 $Log$
+Revision 1.9  2005/02/28 00:07:37  jalet
+Added pkmail's doc.
+Used the <command> tag instead of <application> for commands.
+Fixed some typos.
+Added some missing command line options in the commands reference.
+
 Revision 1.8  2004/10/06 10:03:16  jalet
 Improved documentation
Index: /pykota/trunk/docs/warnpykota.sgml
===================================================================
--- /pykota/trunk/docs/warnpykota.sgml (revision 1783)
+++ /pykota/trunk/docs/warnpykota.sgml (revision 2115)
@@ -17,19 +17,19 @@
     However this may not be sufficient, and you may want to warn users who
     have reached their print quota at
-    regular intervals, like every day, for example in a <application>cron</application> job.
+    regular intervals, like every day, for example from a <application>cron</application> job.
   </para>
   
   <para>
     This may be useful if the user has reached his print quota, and have received an email message telling him so,
-    but then he doesn't print for some days and may forget to solve the problem, by buying more
+    but then he doesn't print for some days and may forget to fix the problem, by buying more
     paper for example.
   </para>
   
   <para>
-    The <application>warnpykota</application> command was written with this in mind. 
+    The <command>warnpykota</command> command was written with this in mind. 
     If you put this command in your <filename>crontab</filename>, launching it for example
     every day, then you'll be sure that all your users who are above their print quota
     will not forget it ! Of course they may delete the messages without having read them,
-    but at least they won't be able to say that they didn't received them ;-)
+    but at least they won't be able to say that they didn't receive them ;-)
   </para>
   
@@ -40,5 +40,5 @@
     argument, then for each group he is a member of in the Quota Storage, each
     group member may receive a warning message. You can take care of this if this
-    becomes annoying by forbidding normal users to launch the <application>warnpykota</application>
+    becomes annoying by forbidding normal users to launch the <command>warnpykota</command>
     command.
   </para>
@@ -76,4 +76,10 @@
 
 $Log$
+Revision 1.7  2005/02/28 00:07:37  jalet
+Added pkmail's doc.
+Used the <command> tag instead of <application> for commands.
+Fixed some typos.
+Added some missing command line options in the commands reference.
+
 Revision 1.6  2004/10/06 10:03:16  jalet
 Improved documentation
Index: /pykota/trunk/docs/autopykota.sgml
===================================================================
--- /pykota/trunk/docs/autopykota.sgml (revision 1783)
+++ /pykota/trunk/docs/autopykota.sgml (revision 2115)
@@ -13,5 +13,5 @@
   
   <para>
-    <application>autopykota</application> was designed to automatically set
+    <command>autopykota</command> was designed to automatically set
     an initial account balance value to newly added users, while taking
     care of not resetting the balance value if the user already exists 
@@ -21,5 +21,5 @@
   <para>
     If you want to limit your users by page quota then you must not use
-    this command. Just use some form of the <application>edpykota</application>
+    this command. Just use some form of the <command>edpykota</command>
     command and it will work just fine. On the other hand, if you want
     to limit your users by their account balance, this command was
@@ -27,5 +27,5 @@
     script to check if user already exists or have a quota entry on
     the current printer before deciding if you have to set the initial
-    balance value or not : <application>autopykota</application> takes
+    balance value or not : <command>autopykota</command> takes
     care of all this automagically.
   </para>
@@ -50,4 +50,10 @@
 
 $Log$
+Revision 1.2  2005/02/28 00:07:37  jalet
+Added pkmail's doc.
+Used the <command> tag instead of <application> for commands.
+Fixed some typos.
+Added some missing command line options in the commands reference.
+
 Revision 1.1  2004/10/06 10:03:16  jalet
 Improved documentation
Index: /pykota/trunk/docs/pkprinters.sgml
===================================================================
--- /pykota/trunk/docs/pkprinters.sgml (revision 1406)
+++ /pykota/trunk/docs/pkprinters.sgml (revision 2115)
@@ -20,4 +20,8 @@
         <group choice="opt"><arg>-a</arg><arg>--add</arg></group>
         <group choice="opt"><arg>-d</arg><arg>--delete</arg></group>
+        <group choice="opt">
+          <arg>-D <replaceable>desc</replaceable></arg>
+          <arg>--description <replaceable>desc</replaceable></arg>
+        </group>
         <group choice="opt"><arg>-r</arg><arg>--remove</arg></group>
         <group choice="opt">
@@ -29,4 +33,7 @@
           <arg>--groups <replaceable>pgroup1</replaceable>,<replaceable>pgroup2</replaceable>,<replaceable>...</replaceable></arg>
         </group>  
+        <group choice="opt"><arg>-l</arg><arg>--list</arg></group>
+        <group choice="opt"><arg>-r</arg><arg>--remove</arg></group>
+        <group choice="opt"><arg>-s</arg><arg>--skipexisting</arg></group>
       </cmdsynopsis>
     </para>
@@ -37,4 +44,10 @@
 
 $Log$
+Revision 1.2  2005/02/28 00:07:37  jalet
+Added pkmail's doc.
+Used the <command> tag instead of <application> for commands.
+Fixed some typos.
+Added some missing command line options in the commands reference.
+
 Revision 1.1  2004/03/16 14:42:31  jalet
 Improved documentation
Index: /pykota/trunk/docs/installation.sgml
===================================================================
--- /pykota/trunk/docs/installation.sgml (revision 1906)
+++ /pykota/trunk/docs/installation.sgml (revision 2115)
@@ -29,7 +29,7 @@
     have to decompress and visit its archive, to do so just type the following commands :
     <screen>
-jerome@nordine:~$ tar -zxf pykota-1.20_official.tar.gz    
-jerome@nordine:~$ cd pykota-1.20_official
-jerome@nordine:~/pykota-1.20_official$
+jerome@nordine:~$ tar -zxf pykota-1.21_official.tar.gz    
+jerome@nordine:~$ cd pykota-1.21_official
+jerome@nordine:~/pykota-1.21_official$
     </screen>
   </para>
@@ -160,13 +160,13 @@
       
       <para>
-        To run this script, you can use the <application>psql</application> frontend to
+        To run this script, you can use the <command>psql</command> frontend to
         <application>PostgreSQL</application>, but your priviledges must be sufficient
-        to be allowed to create users and databases. You can launch <application>psql</application>
+        to be allowed to create users and databases. You can launch <command>psql</command>
         as the <literal>postgres</literal> user which is <application>PostgreSQL</application>'s
         default administrator, and connect to the default database named <literal>template1</literal>.
         From a command line interpreter (i.e. shell), type the following commands :
         <screen>
-jerome@nordine:~$ cd pykota-1.20_official/initscripts/postgresql
-jerome@nordine:~/pykota-1.20_official/initscripts$ psql -h localhost -U postgres template1
+jerome@nordine:~$ cd pykota-1.21_official/initscripts/postgresql
+jerome@nordine:~/pykota-1.21_official/initscripts$ psql -h localhost -U postgres template1
 Welcome to psql, the PostgreSQL interactive terminal.
 
@@ -202,5 +202,5 @@
       
       <para>
-        To do so, just type the following lines while still being at the <application>psql</application>
+        To do so, just type the following lines while still being at the <command>psql</command>
         prompt (replace the password values by your own, and do the same for the <literal>pykotauser</literal> user) :
         <screen>
@@ -208,10 +208,10 @@
 ALTER USER
 pykota=# \q
-jerome@nordine:~/pykota-1.20_official/initscripts/postgresql$
+jerome@nordine:~/pykota-1.21_official/initscripts/postgresql$
         </screen>
       </para>
       
       <para>
-        The <literal>\q</literal> command above will quit the <application>psql</application>
+        The <literal>\q</literal> command above will quit the <command>psql</command>
         program and return you to the shell's command line prompt.
       </para>
@@ -360,6 +360,6 @@
         difficult to guess what is the best configuration for you. So you have to
         create them by yourself, either directly with a text editor and the
-        <application>ldapadd</application> command, or with some specialized tool
-        like <application>gq</application>. You can look at the <filename>initscripts/ldap/pykota-sample.ldif</filename>
+        <command>ldapadd</command> command, or with some specialized tool
+        like <command>gq</command>. You can look at the <filename>initscripts/ldap/pykota-sample.ldif</filename>
         file to see what minimal branches are necessary.
         <note>
@@ -381,5 +381,5 @@
         <filename>pykota/conf/pykota.conf.sample</filename> to see all the options that are
         needed. Adapt the values to your own configuration, and finally initialize your 
-        Quota Storage with the help of the <application>edpykota</application> command.
+        Quota Storage with the help of the <command>edpykota</command> command.
       </para>
     </sect2>  
@@ -501,5 +501,5 @@
           <para>
             <application>ucd-snmp</application> or <application>net-snmp</application> tools, version 4.2.5 or above. You only need
-            the <application>snmpget</application> command.
+            the <command>snmpget</command> command.
             You can download this software from <ulink url="http://www.sourceforge.net/projects/net-snmp/">http://www.sourceforge.net/projects/net-snmp/</ulink>.
             You only need this if you plan to query your printers for their internal page counter via SNMP.
@@ -509,5 +509,5 @@
           <para>
             <application>netatalk</application> version 1.6.1 or above. You only need
-            the <application>pap</application> command.
+            the <command>pap</command> command.
             You can download this software from <ulink url="http://netatalk.sourceforge.net/">http://netatalk.sourceforge.net/</ulink>.
             You only need this if you plan to query your printers for their internal page counter via AppleTalk.
@@ -763,4 +763,10 @@
 
 $Log$
+Revision 1.30  2005/02/28 00:07:37  jalet
+Added pkmail's doc.
+Used the <command> tag instead of <application> for commands.
+Fixed some typos.
+Added some missing command line options in the commands reference.
+
 Revision 1.29  2004/11/10 22:35:23  jalet
 Changes to the installation documentation
Index: /pykota/trunk/docs/pykota.sgml
===================================================================
--- /pykota/trunk/docs/pykota.sgml (revision 2028)
+++ /pykota/trunk/docs/pykota.sgml (revision 2115)
@@ -13,4 +13,5 @@
   <!entity DUMPYKOTA system "dumpykota.sgml">
   <!entity AUTOPYKOTA system "autopykota.sgml">
+  <!entity PKMAIL system "pkmail.sgml">
   <!entity GNUGPL system "gnugpl.sgml">
 
@@ -129,4 +130,6 @@
   &PYKOSD;
   
+  &PKMAIL;
+  
   &SCRIPTS;
     
@@ -138,4 +141,10 @@
 
 $Log$
+Revision 1.17  2005/02/28 00:07:37  jalet
+Added pkmail's doc.
+Used the <command> tag instead of <application> for commands.
+Fixed some typos.
+Added some missing command line options in the commands reference.
+
 Revision 1.16  2005/01/17 08:44:24  jalet
 Modified copyright years
Index: /pykota/trunk/docs/pkmail.sgml
===================================================================
--- /pykota/trunk/docs/pkmail.sgml (revision 2115)
+++ /pykota/trunk/docs/pkmail.sgml (revision 2115)
@@ -0,0 +1,112 @@
+<!-- $Id: -->
+
+<chapter>
+  <title>Control PyKota by email with pkmail</title>
+  <para>Last modified on $Date$</para>
+  
+  <para>
+    <command>pkmail</command> is an email gateway which allows you to control
+    <application>PyKota</application> using email messages.
+  </para>  
+  
+  <para>
+    For now, this command can't do more than print quota reports, but more
+    powerful functionnalities are planned for a future release.
+  </para>
+  
+  <sect1>
+    <title>Installation</title>
+    <para>
+      Contrary to other commands included with <application>PyKota</application>,
+      <command>pkmail</command> is not meant to be used from the command line,
+      but instead launched from your mail server when particular messages are
+      received.
+    </para>
+    
+    <para>
+      In order to achieve this, the easiest way is to define a special
+      email alias. Every message received on this address will cause your webserver to automatically
+      launch <command>pkmail</command>, passing the message's content on <command>pkmail</command>'s standard input.
+    </para>
+    
+    <para>
+      The name of the email alias is completely free, let's call it <literal>pykotacmd</literal> for example.
+      Now edit <filename>/etc/aliases</filename> with your favorite text editor and enter the following :
+<screen>      
+pykotacmd :     "|/usr/bin/pkmail"
+</screen>
+    </para>
+    
+    <para>
+      Finally, tell your mail server that new aliases are available. To do so, at the command prompt just
+      type :
+<screen>      
+$ newaliases
+</screen>      
+    </para>
+    
+    <para>
+      But to be useful, <command>pkmail</command> must be able to read <application>PyKota</application>'s
+      <filename>pykotadmin.conf</filename> configuration file. A simple way to do so is to put the system
+      user your mail server runs aliases commands as into the <literal>pykota</literal> system group, then
+      restart your mail server software.
+      <tip>
+        <title>Tip</title>
+        <para>
+          Depending on the software you use as the mail server, additional work may be needed. For example
+          <application>Exim</application> doesn't by default initialize all the groups when launching a
+          command from the <filename>/etc/aliases</filename> database. Please refer to your mail server's
+          documentation for details.
+        </para>
+      </tip>  
+    </para>
+  </sect1>  
+  
+  <sect1>
+    <title>Usage</title>
+    <para>
+      Now that <command>pkmail</command> is installed, we can use it by sending email messages to the address
+      <literal>pykotacmd@yourmailserver.example.com</literal>. This command will then process your request,
+      and send the result back to you by email.
+    </para>
+    
+    <para>
+      For now, <command>pkmail</command> only accepts commands in the <literal>Subject:</literal> field
+      of the email message you send to it.
+    </para>
+    
+    <para>
+      <command>pkmail</command> is still in a pretty experimental state, and only recognizes a single command :
+      <command>report</command>
+    </para>
+    
+    <para>
+      The <command>report</command> takes an username as its only optional argument. So for example to
+      receive a print quota report for user <literal>jerome</literal>, you'll just have to send
+      an email message with <literal>report jerome</literal> in the subject.
+    </para>
+  </sect1>  
+  
+  <sect1>
+    <title>Reference</title>
+    <para>
+      <cmdsynopsis>
+        <command>pkmail</command>
+        <group choice="opt"><arg>-v</arg><arg>--version</arg></group>
+        <group choice="opt"><arg>-h</arg><arg>--help</arg></group>
+      </cmdsynopsis>
+    </para>
+  </sect1>
+</chapter>
+
+<!--
+
+$Log$
+Revision 1.1  2005/02/28 00:07:37  jalet
+Added pkmail's doc.
+Used the <command> tag instead of <application> for commands.
+Fixed some typos.
+Added some missing command line options in the commands reference.
+
+
+-->
Index: /pykota/trunk/docs/dumpykota.sgml
===================================================================
--- /pykota/trunk/docs/dumpykota.sgml (revision 1783)
+++ /pykota/trunk/docs/dumpykota.sgml (revision 2115)
@@ -6,14 +6,25 @@
   
   <para>
-    If you want to reuse <application>PyKota</application> datas in another
+    If you want to reuse <application>PyKota</application> datas from another
     software, but don't want to modify your existing application to
     have it connect to <application>PyKota</application>'s database, your
-    best option is the new <application>dumpykota</application> command.
+    best option is the new <command>dumpykota</command> command.
   </para>
   
   <para>
-    <application>dumpykota</application> can export <application>PyKota</application>
+    <command>dumpykota</command> can export <application>PyKota</application>
     datas in a number of formats. The supported output formats are
     comma separated values, semicolon separated values, tab separated values, and <acronym>XML</acronym>.
+  </para>  
+  
+  <para>
+    For the print job history's datas, a special format identical to <application>CUPS</application>' <literal>page_log</literal>
+    format is also supported.
+    This allows you to interface <application>PyKota</application> with third party tools like
+    <application>phpPrintAnalyzer</application> which is a logfile analyzer for <application>CUPS</application>,
+    even in the case where you use <application>LPRng</application> instead of <application>CUPS</application>.
+  </para>  
+  
+  <para>
     More formats may be added in the future. In particular, 
     <acronym>SQL</acronym> and <acronym>LDIF</acronym> are planned, but 
@@ -22,5 +33,5 @@
   
   <para>
-    <application>dumpykota</application> can't dump all datas at once though, you have
+    <command>dumpykota</command> can't dump all datas at once though, you have
     to specify which type of datas you want. The possible types are :
     <itemizedlist>
@@ -45,8 +56,14 @@
   <para>
     This command could also be used if you plan to write your own management
-    tools : just write wrappers around the <application>pkprinters</application>,
-    <application>edpykota</application>, and <application>dumpykota</application>
+    tools : just write wrappers around the <command>pkprinters</command>,
+    <command>edpykota</command>, and <command>dumpykota</command>
     tools, and your own tools will automatically benefit from <application>PyKota</application>
     database backend independance layer.
+    This is exactly what the third party software <application>phpPykotaAdmin</application> does.
+  </para>
+  
+  <para>
+    Finally, <command>dumpykota</command>'s functionnality is now also available remotely through
+    the use of the <filename>dumpykota.cgi</filename> <acronym>CGI</acronym> script.
   </para>
   
@@ -85,4 +102,10 @@
 
 $Log$
+Revision 1.3  2005/02/28 00:07:37  jalet
+Added pkmail's doc.
+Used the <command> tag instead of <application> for commands.
+Fixed some typos.
+Added some missing command line options in the commands reference.
+
 Revision 1.2  2004/10/06 10:03:16  jalet
 Improved documentation
