root / pykota / trunk / docs / dumpykota.sgml @ 2250

Revision 2236, 4.8 kB (checked in by jerome, 20 years ago)

Improved dumpykota's help

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1<!-- $Id$ -->
2
3<chapter>
4  <title>Export datas to other software with dumpykota</title>
5  <para>Last modified on $Date$</para>
6 
7  <para>
8    If you want to reuse <application>PyKota</application> datas from another
9    software, but don't want to modify your existing application to
10    have it connect to <application>PyKota</application>'s database, your
11    best option is the new <command>dumpykota</command> command.
12  </para>
13 
14  <para>
15    <command>dumpykota</command> can export <application>PyKota</application>
16    datas in a number of formats. The supported output formats are
17    comma separated values, semicolon separated values, tab separated values, and <acronym>XML</acronym>.
18  </para> 
19 
20  <para>
21    For the print job history's datas, a special format identical to <application>CUPS</application>' <literal>page_log</literal>
22    format is also supported.
23    This allows you to interface <application>PyKota</application> with third party tools like
24    <application>phpPrintAnalyzer</application> which is a logfile analyzer for <application>CUPS</application>,
25    even in the case where you use <application>LPRng</application> instead of <application>CUPS</application>.
26  </para> 
27 
28  <para>
29    More formats may be added in the future. In particular,
30    <acronym>SQL</acronym> and <acronym>LDIF</acronym> are planned, but
31    are currently not implemented.
32  </para>
33 
34  <para>
35    <command>dumpykota</command> can't dump all datas at once though, you have
36    to specify which type of datas you want. The possible types are :
37    <itemizedlist>
38      <listitem><para>Users</para></listitem>
39      <listitem><para>Users groups</para></listitem>
40      <listitem><para>Printers</para></listitem>
41      <listitem><para>Printers groups membership</para></listitem>
42      <listitem><para>Users groups membership</para></listitem>
43      <listitem><para>Users print quota entries</para></listitem>
44      <listitem><para>Users groups print quota entries</para></listitem>
45      <listitem><para>History of payments</para></listitem>
46      <listitem><para>History of print jobs</para></listitem>
47    </itemizedlist> 
48  </para>
49 
50  <para>
51    You can then import the dumped datas into a spreadsheet for example,
52    if you want to create complex reports with nice looking graphs and
53    the like.
54  </para>
55 
56  <para>
57    An important feature of this command is the possibility to use
58    a simple but powerful filtering mechanism to only export the datas
59    you want. You can pass any number of filter expressions which will
60    be ANDed together to select only certain records in the database.
61    For example the filter expression <literal>username=jerome</literal>
62    would only dump datas pertaining to user <literal>jerome</literal>.
63  </para>
64 
65  <para>
66    Several keys like <literal>username</literal> are possible, but some
67    only apply to certain data types. Using a key which is not supported
68    for a particular data type will return an empty result.
69    <tip><title>Tip</title>
70      <para>
71        Please refer to dumpykota's help or manual page to obtain
72        the complete list of supported keys.
73      </para>
74    </tip> 
75  </para>
76 
77  <para>
78    This command could also be used if you plan to write your own management
79    tools : just write wrappers around the <command>pkprinters</command>,
80    <command>edpykota</command>, and <command>dumpykota</command>
81    tools, and your own tools will automatically benefit from <application>PyKota</application>
82    database backend independance layer.
83    This is exactly what the third party software <application>phpPykotaAdmin</application> does.
84  </para>
85 
86  <para>
87    Finally, <command>dumpykota</command>'s functionnality is now also available remotely through
88    the use of the <filename>dumpykota.cgi</filename> <acronym>CGI</acronym> script.
89  </para>
90 
91  <warning>
92    <title>Warning</title>
93    <para>
94      Only <application>PyKota</application> administrators can dump PyKota's datas.
95    </para>
96  </warning> 
97       
98  <sect1>
99    <title>Reference</title>
100    <para>
101      <cmdsynopsis>
102        <command>dumpykota</command>
103        <group choice="opt"><arg>-v</arg><arg>--version</arg></group>
104        <group choice="opt"><arg>-h</arg><arg>--help</arg></group>
105        <group choice="opt">
106          <arg>-f <replaceable>outputformat</replaceable></arg>
107          <arg>--format <replaceable>outputformat</replaceable></arg>
108        </group>
109        <group choice="opt">
110          <arg>-o <replaceable>filename</replaceable></arg>
111          <arg>--output <replaceable>filename</replaceable></arg>
112        </group>
113        <group choice="req">
114          <arg>-d <replaceable>datatype</replaceable></arg>
115          <arg>--data <replaceable>datatype</replaceable></arg>
116        </group>
117      </cmdsynopsis>
118    </para>
119  </sect1>
120</chapter>
121
Note: See TracBrowser for help on using the browser.