6 | | dumpykota v1.27alpha3_BROKEN_unofficial (c) 2003, 2004, 2005, 2006, 2007, 2008 Jerome Alet \- alet@librelogiciel.com |
7 | | .PP |
8 | | Dumps PyKota database's content. |
9 | | .PP |
10 | | command line usage : |
| 9 | Data Dumper for PyKota. |
| 10 | .SH OPTIONS |
| 11 | .TP |
| 12 | \fB\-h\fR, \fB\-\-help\fR |
| 13 | show this help message and exit. |
| 14 | .TP |
| 15 | \fB\-v\fR, \fB\-\-version\fR |
| 16 | show the version number and exit. |
| 17 | .TP |
| 18 | \fB\-A\fR ARGUMENTSFILE, \fB\-\-arguments\fR=\fIARGUMENTSFILE\fR |
| 19 | loads additional options and arguments from a file, |
| 20 | one per line. |
| 21 | .TP |
| 22 | \fB\-d\fR DATA, \fB\-\-data\fR=\fIDATA\fR |
| 23 | Select the type of datas to dump. This option is |
| 24 | mandatory. Supported data types are : history, |
| 25 | payments, billingcodes, users, groups, printers, |
| 26 | upquotas, gpquotas, umembers, pmembers, and all. The |
| 27 | \&'all' value forces the output format to XML. |
| 28 | .TP |
| 29 | \fB\-f\fR FORMAT, \fB\-\-format\fR=\fIFORMAT\fR |
| 30 | Select the output format, the default being comma |
| 31 | separated values. Supported formats are : csv, ssv, |
| 32 | tsv, xml and cups. The 'cups' output format only works |
| 33 | when dumping the history, and produces CUPS' page_log |
| 34 | compatible output. |
| 35 | .TP |
| 36 | \fB\-o\fR OUTPUT, \fB\-\-output\fR=\fIOUTPUT\fR |
| 37 | The name of the file the data dump will be written to. |
| 38 | The default value is '\-', which tells dumpykota to |
| 39 | write the dump to stdout. |
| 40 | .TP |
| 41 | \fB\-O\fR ORDERBY, \fB\-\-orderby\fR=\fIORDERBY\fR |
| 42 | Change the ordering of the output based on a comma |
| 43 | separated list of ordering statements. For example |
| 44 | \&'\-username,+printername' would sort the output by |
| 45 | descending order of user names and ascending order of |
| 46 | printer names. Not all expressions are supported, and |
| 47 | you should not use this if you don't know the internal |
| 48 | structure of PyKota's database. |
| 49 | .TP |
| 50 | \fB\-s\fR, \fB\-\-sum\fR |
| 51 | Summarize the output. Only available when dumping the |
| 52 | printing history or the payments. |
| 53 | .SS "filtering expressions:" |
12 | | dumpykota [options] [filterexpr] |
13 | | .PP |
14 | | options : |
15 | | .TP |
16 | | \fB\-v\fR | \fB\-\-version\fR |
17 | | Prints dumpykota's version number then exits. |
18 | | .TP |
19 | | \fB\-h\fR | \fB\-\-help\fR |
20 | | Prints this message then exits. |
21 | | .TP |
22 | | \fB\-d\fR | \fB\-\-data\fR type |
23 | | Dumps 'type' datas. Allowed types are : |
| 55 | Use the filtering expressions to extract only parts of the datas. Allowed |
| 56 | filters are of the form 'key=value'. Wildcards are not expanded as part of |
| 57 | these filtering expressions, so you can't use them here. |
25 | | \- history : dumps the jobs history. |
26 | | \- users : dumps users. |
27 | | \- groups : dumps user groups. |
28 | | \- printers : dump printers. |
29 | | \- upquotas : dump user quotas. |
30 | | \- gpquotas : dump user groups quotas. |
31 | | \- payments : dumps user payments. |
32 | | \- pmembers : dumps printer groups members. |
33 | | \- umembers : dumps user groups members. |
34 | | \- billingcodes : dumps billing codes. |
35 | | \- all : dumps all PyKota datas. The output format |
| 59 | allowed keys for now: |
39 | | NB : the \fB\-d\fR | \fB\-\-data\fR command line option |
40 | | is MANDATORY. |
41 | | .TP |
42 | | \fB\-f\fR | \fB\-\-format\fR fmt |
43 | | Dumps datas in the 'fmt' format. When not specified, |
44 | | the format is to dump datas in the csv format (comma |
45 | | separated values). All data dumped is between double |
46 | | quotes. Allowed formats are : |
47 | | .IP |
48 | | \- csv : separate datas with commas |
49 | | \- ssv : separate datas with semicolons |
50 | | \- tsv : separate datas with tabs |
51 | | \- xml : dump data as XML |
52 | | \- cups : dump datas in CUPS' page_log format : |
53 | | .IP |
54 | | ONLY AVAILABLE WITH \fB\-\-data\fR history |
55 | | .TP |
56 | | \fB\-o\fR | \fB\-\-output\fR fname |
57 | | All datas will be dumped to the file instead of |
58 | | to the standard output. The special '\-' filename |
59 | | is the default value and means stdout. |
60 | | WARNING : existing files are truncated ! |
61 | | .TP |
62 | | \fB\-O\fR | \fB\-\-orderby\fR exp |
63 | | Change the ordering or result. 'exp' is a comma |
64 | | separated list of ordering statements, for example |
65 | | \&'\-\-orderby +username,\-printername'. Not all expression |
66 | | values are meaningful, so using this command line |
67 | | switch is not recommanded if you don't know the |
68 | | exact layout of PyKota's database schema. |
69 | | .TP |
70 | | \fB\-s\fR | \fB\-\-sum\fR |
71 | | Summarize the selected datas. |
72 | | ONLY AVAILABLE WITH \fB\-\-data\fR history or payments |
73 | | .IP |
74 | | Use the filter expressions to extract only parts of the |
75 | | datas. Allowed filters are of the form : |
76 | | .IP |
77 | | key=value |
78 | | .IP |
79 | | Allowed keys for now are : |
80 | | .TP |
81 | | username |
82 | | User's name |
83 | | .TP |
84 | | groupname |
85 | | Users group's name |
86 | | .TP |
87 | | printername |
88 | | Printer's name |
89 | | .TP |
90 | | pgroupname |
91 | | Printers group's name |
92 | | .TP |
93 | | hostname |
94 | | Client's hostname |
95 | | .TP |
96 | | jobid |
97 | | Job's Id |
98 | | .TP |
99 | | billingcode |
100 | | Job's billing code |
101 | | .TP |
102 | | start |
103 | | Job's date of printing |
104 | | .TP |
105 | | end |
106 | | Job's date of printing |
107 | | .IP |
108 | | Dates formatting with 'start' and 'end' filter keys : |
| 71 | formatting of dates with the 'start' and 'end' filtering keys: |
155 | | the Free Software Foundation, either version 3 of the License, or |
156 | | (at your option) any later version. |
157 | | .PP |
158 | | This program is distributed in the hope that it will be useful, |
159 | | but WITHOUT ANY WARRANTY; without even the implied warranty of |
160 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
161 | | GNU General Public License for more details. |
162 | | .PP |
| 114 | the Free Software Foundation, either version 3 of the License, or (at |
| 115 | your option) any later version. |
| 116 | .IP |
| 117 | This program is distributed in the hope that it will be useful, but |
| 118 | WITHOUT ANY WARRANTY; without even the implied warranty of |
| 119 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 120 | General Public License for more details. |
| 121 | .IP |