[3561] | 1 | .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.1. |
---|
| 2 | .TH DUMPYKOTA "1" "janvier 2013" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" |
---|
[2228] | 3 | .SH NOM |
---|
[3561] | 4 | dumpykota \- page de manuel de dumpykota (PyKota) 1.27alpha14_unofficial |
---|
[3485] | 5 | .SH SYNOPSIS |
---|
| 6 | .B dumpykota |
---|
| 7 | [\fIoptions\fR] [\fIfilterexpr\fR] |
---|
[1866] | 8 | .SH DESCRIPTION |
---|
[3485] | 9 | Data Dumper for PyKota. |
---|
| 10 | .SH OPTIONS |
---|
[1866] | 11 | .TP |
---|
[3485] | 12 | \fB\-h\fR, \fB\-\-help\fR |
---|
| 13 | show this help message and exit. |
---|
[1866] | 14 | .TP |
---|
[3485] | 15 | \fB\-v\fR, \fB\-\-version\fR |
---|
| 16 | show the version number and exit. |
---|
[1866] | 17 | .TP |
---|
[3485] | 18 | \fB\-A\fR ARGUMENTSFILE, \fB\-\-arguments\fR=\fIARGUMENTSFILE\fR |
---|
| 19 | loads additional options and arguments from a file, |
---|
| 20 | one per line. |
---|
[1866] | 21 | .TP |
---|
[3485] | 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. |
---|
[1866] | 28 | .TP |
---|
[3485] | 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. |
---|
[2303] | 35 | .TP |
---|
[3485] | 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. |
---|
[3166] | 40 | .TP |
---|
[3485] | 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:" |
---|
[2086] | 54 | .IP |
---|
[3485] | 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. |
---|
[2086] | 58 | .IP |
---|
[3485] | 59 | allowed keys for now: |
---|
[2086] | 60 | .IP |
---|
[3485] | 61 | username : User's name |
---|
| 62 | groupname : Users group's name |
---|
| 63 | printername : Printer's name |
---|
| 64 | pgroupname : Printers group's name |
---|
| 65 | hostname : Host's name |
---|
| 66 | jobid : Job's id |
---|
| 67 | billingcode : Job's billing code |
---|
| 68 | start : Job's date of printing |
---|
| 69 | end : Job's date of printing |
---|
[2086] | 70 | .IP |
---|
[3485] | 71 | formatting of dates with the 'start' and 'end' filtering keys: |
---|
[3094] | 72 | .IP |
---|
| 73 | YYYY : year boundaries |
---|
| 74 | YYYYMM : month boundaries |
---|
| 75 | YYYYMMDD : day boundaries |
---|
| 76 | YYYYMMDDhh : hour boundaries |
---|
| 77 | YYYYMMDDhhmm : minute boundaries |
---|
| 78 | YYYYMMDDhhmmss : second boundaries |
---|
[3485] | 79 | yesterday[+\-N] : yesterday more or less N days (e.g. : yesterday\-15) |
---|
| 80 | today[+\-N] : today more or less N days (e.g. : today\-15) |
---|
| 81 | tomorrow[+\-N] : tomorrow more or less N days (e.g. : tomorrow\-15) |
---|
| 82 | now[+\-N] : now more or less N days (e.g. now\-15) |
---|
[3094] | 83 | .IP |
---|
[3485] | 84 | \&'now' and 'today' are not exactly the same since 'today' represents the |
---|
| 85 | first or last second of the day depending on if it's used in a 'start=' or |
---|
| 86 | \&'end=' date expression. |
---|
[3094] | 87 | .IP |
---|
[3485] | 88 | examples: |
---|
[2086] | 89 | .IP |
---|
[3561] | 90 | dumpykota \fB\-\-unit\fR EURO \fB\-\-output\fR \fI/tmp/invoices.pdf\fP start=now\-30 |
---|
[3485] | 91 | This would generate a PDF document containing invoices for all users |
---|
| 92 | who have spent some credits last month. Amounts would be in EURO and |
---|
| 93 | not VAT information would be included. |
---|
[1866] | 94 | .IP |
---|
[3485] | 95 | dumpykota \fB\-\-data\fR history \fB\-\-format\fR csv >myfile.csv |
---|
| 96 | This would dump the whole printing history to stdout in the CSV |
---|
| 97 | format, and redirect the output to a file. |
---|
[1866] | 98 | .IP |
---|
[3485] | 99 | dumpykota \fB\-\-data\fR users \fB\-\-format\fR xml \fB\-o\fR users.xml |
---|
| 100 | This would dump all users into the 'users.xml' file in the XML format. |
---|
[1866] | 101 | .IP |
---|
[3485] | 102 | dumpykota \fB\-\-data\fR history printername=HP2100 username=jerome |
---|
| 103 | This would dump jerome's printing history on printer HP2100. |
---|
[1866] | 104 | .IP |
---|
[3485] | 105 | dumpykota \fB\-\-data\fR history start=200503 end=20050730234615 |
---|
| 106 | This would dump all jobs printer between March 1st 2008 at midnight |
---|
| 107 | and July 30th 2008 at 23 hours 46 minutes and 15 seconds, included. |
---|
[2086] | 108 | .IP |
---|
[3485] | 109 | licensing terms: |
---|
[2086] | 110 | .IP |
---|
[3561] | 111 | (c) 2003\-2013 Jerome Alet \- alet@librelogiciel.com |
---|
[3259] | 112 | This program is free software: you can redistribute it and/or modify |
---|
[1866] | 113 | it under the terms of the GNU General Public License as published by |
---|
[3485] | 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 |
---|
[1866] | 122 | You should have received a copy of the GNU General Public License |
---|
[3259] | 123 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|