Index: pykota/trunk/docs/installation.sgml
===================================================================
--- pykota/trunk/docs/installation.sgml (revision 1052)
+++ pykota/trunk/docs/installation.sgml (revision 1099)
@@ -116,5 +116,5 @@
         is the case, then the best thing you can do is to ask your <firstterm>Network Administrator</firstterm>
         to not filter the IP port used by <application>PostgreSQL</application>, which is
-        usually port 5432/tcp.
+        usually port <literal>5432/tcp</literal>.
         <note>
           <title>Note</title>
@@ -138,4 +138,8 @@
         have to exist on any system, nor in the Quota DataBase. His default names
         is <literal>pykotaadmin</literal>. 
+        A Quota Storage read-only user is also created under the name of <literal>pykotauser</literal>.
+        This read-only user is used by <application>PyKota</application> to connect to the 
+        Quota Storage when a non-root user launches a pykota command. This prevents normal
+        users from being able to modify their own, or other users', quota information.
         The database which will be created will be named <literal>pykota</literal> by default.
         <note>
@@ -177,13 +181,13 @@
         For security reasons, you may want to set passwords in 
         <application>PostgreSQL</application> for the 
-        <literal>pykotaadmin</literal> user.
+        <literal>pykotaadmin</literal> and <literal>pykotauser</literal> users.
         Otherwise any user able to connect to 
         <application>PostgreSQL</application> on your Quota Storage Server 
-        could connect to the quota database as this user, and modify it without problem. 
+        could connect to the quota database, and either see it, or even modify it without problem. 
       </para>
       
       <para>
         To do so, just type the following lines while still being at the <application>psql</application>
-        prompt (replace the password values by your own) :
+        prompt (replace the password values by your own, and do the same for the <literal>pykotauser</literal> user) :
         <screen>
 pykota=# ALTER USER pykotaadmin PASSWORD 'somepassword';
@@ -203,5 +207,5 @@
         take any other step as needed. Please refer to <application>PostgreSQL</application>'s
         documentation for details. Also if <application>PyKota</application>'s configuration
-        file is readable by anyone with access on your file system, a local user could 
+        file <filename>/etc/pykota/pykotadmin.conf</filename> is readable by anyone with access on your file system, a local user could 
         create some script to modify his own print quota.
         <warning>
@@ -274,5 +278,6 @@
       
       <para>
-        Then you have to modify PyKota's configuration file <filename>/etc/pykota.conf</filename>
+        Then you have to modify PyKota's configuration files <filename>/etc/pykota/pykota.conf</filename>
+        and <filename>/etc/pykota/pykotadmin.conf</filename>
         to include LDAP specific options. You may want to give a look at 
         <filename>pykota/conf/pykota.conf.sample</filename> to see all the options that are
@@ -361,10 +366,10 @@
               <listitem>
                 <para>
-                  MySQL backend : TODO
+                  LDAP backend : TODO
                 </para>
               </listitem>
               <listitem>
                 <para>
-                  LDAP backend : TODO
+                  MySQL backend : TODO
                 </para>
               </listitem>
@@ -407,4 +412,9 @@
 
 $Log$
+Revision 1.18  2003/07/25 10:41:29  jalet
+Better documentation.
+pykotme now displays the current user's account balance.
+Some test changed in ldap module.
+
 Revision 1.17  2003/06/30 21:44:18  jalet
 1.09 is out !
Index: pykota/trunk/docs/pykota.sgml
===================================================================
--- pykota/trunk/docs/pykota.sgml (revision 865)
+++ pykota/trunk/docs/pykota.sgml (revision 1099)
@@ -3,6 +3,7 @@
   <!entity INSTALLATION system "installation.sgml">
   <!entity EDPYKOTA system "edpykota.sgml">
+  <!entity REPYKOTA system "repykota.sgml">
+  <!entity PYKOTME system "pykotme.sgml">
   <!entity WARNPYKOTA system "warnpykota.sgml">
-  <!entity REPYKOTA system "repykota.sgml">
   <!entity FILTERPYKOTA system "filterpykota.sgml">
   <!entity GNUFDL system "gnufdl.sgml">
@@ -86,4 +87,6 @@
   &REPYKOTA;
     
+  &PYKOTME;  
+  
   &WARNPYKOTA;
     
@@ -95,4 +98,9 @@
 
 $Log$
+Revision 1.5  2003/07/25 10:41:29  jalet
+Better documentation.
+pykotme now displays the current user's account balance.
+Some test changed in ldap module.
+
 Revision 1.4  2003/03/25 09:32:06  jalet
 Improved documentation.
Index: pykota/trunk/docs/pykotme.sgml
===================================================================
--- pykota/trunk/docs/pykotme.sgml (revision 1099)
+++ pykota/trunk/docs/pykotme.sgml (revision 1099)
@@ -0,0 +1,76 @@
+<!-- $Id: -->
+
+<chapter>
+  <title id="pykotme">Get print quotes before printing for real</title>
+  <para>Last modified on $Date$</para>
+  
+  <para>
+    PyKota features a print quote generator, named <application>pykotme</application>.
+    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.
+    You can then decide if printing your document is a good idea or not, and do it
+    knowingly.
+  </para>
+  
+  <para>
+    To get a print quote, you have to launch <application>pykotme</application>
+    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,
+    or on its standard input (i.e. in a shell pipe or redirection).
+  </para>
+  
+  <para>
+    Without any command line argument, <application>pykotme</application>
+    automatically reads your job's data from its standard input.
+  </para>
+  
+  <para>
+    By default, <application>pykotme</application>
+    will display a quote for your job on all printers. You can restrict
+    this by using the <literal>-p | --printer</literal> command line
+    option followed with either a printer's name or a wildcard
+    which will be used to search all printers which name matches.
+  </para>
+  
+  <sect1>
+    <title>Examples</title>
+    <para>
+      Here are some examples of <application>pykotme</application> usage.
+    </para>
+    
+    <para>
+      The simplest form :
+<screen>    
+port50-2:~$ pykotme pykota.ps
+Your account balance : 16.25
+Job size : 22 pages
+Cost on printer apple : 1.35
+port50-2:~$ 
+</screen>    
+    </para>
+    
+    <para>
+      More complex, with printer name wildcard and within a pipe :
+<screen>      
+port50-2:~$ a2ps -o - pykota/README | pykotme --printer "a*"
+[pykota/README (plain): 6 pages on 3 sheets]
+[Total: 6 pages on 3 sheets] sent to the standard output
+Your account balance : 16.25
+Job size : 3 pages
+Cost on printer apple : 0.40
+port50-2:~$ 
+</screen>
+    </para>
+  </sect1>
+</chapter>
+
+<!--
+
+$Log$
+Revision 1.1  2003/07/25 10:41:30  jalet
+Better documentation.
+pykotme now displays the current user's account balance.
+Some test changed in ldap module.
+
+
+-->
Index: pykota/trunk/docs/filterpykota.sgml
===================================================================
--- pykota/trunk/docs/filterpykota.sgml (revision 982)
+++ pykota/trunk/docs/filterpykota.sgml (revision 1099)
@@ -44,10 +44,9 @@
     Currently with a <application>CUPS</application> backend, the <application>pykota</application> filter is used at the very last stage of the print mechanism,
     just before the final data is sent to the printer, but it may eventually be used earlier with some
-    modifications to <application>CUPS</application>'s filtering configuration. This is not tested yet, but this
-    may be the solution to use <application>PyKota</application> with printers which really needs to have
-    a specific filter like <application>magicfilter</application> or <application>cupsomatic</application>, 
-    i.e. non-postscript printers. This is a limitation in <application>CUPS</application> which doesn't really
-    allow to specify multiple print filters for different purposes. This problem will be solved in <application>CUPS</application>
-    version 1.2 and higher.
+    modifications to <application>CUPS</application>'s filtering configuration. 
+    You can find in the mailing list archives of July 2003 an explanation on how to do this.
+    This may allow you to use PyKota with a not-PostScript printer or with a PostScript printer
+    which really needs to have
+    a specific filter like <application>magicfilter</application> or <application>cupsomatic</application>.
   </para>
   
@@ -68,4 +67,5 @@
   
   <para>
+    When using the <literal>querying</literal> accounting method,
     <application>pykota</application> then asks the printer for its internal page counter, read from the Quota DataBase the internal
     page counter for this printer when the previous job was launched, computes the difference, and report it as the 
@@ -77,7 +77,16 @@
   
   <para>
+    When using the <literal>external</literal> accounting method,
+    and if the user is still allowed to print,
+    the command you specified is launched with the job's data on its 
+    standard input. Your command must print the job's size in number of
+    pages on a single line on its standard output. This number is then
+    read by PyKota and used to update the current user's quota information.
+  </para>
+  
+  <para>
     If a problem occurs, it is logged either to the filter's standard output or to the system logger, depending on
     your preferences in <application>PyKota</application>'s configuration file. Also if a print quota is reached
-    you may choose if the administrator, the user, both or noone will receive an email message explaining
+    you may choose if the administrator, the user, both or no-one will receive an email message explaining
     the situation and proposing a solution.
   </para>
@@ -88,4 +97,9 @@
 
 $Log$
+Revision 1.5  2003/07/25 10:41:29  jalet
+Better documentation.
+pykotme now displays the current user's account balance.
+Some test changed in ldap module.
+
 Revision 1.4  2003/04/30 20:00:51  jalet
 Typo
