Show
Ignore:
Timestamp:
09/27/08 22:02:37 (16 years ago)
Author:
jerome
Message:

Removed unnecessary spaces at EOL.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/dumpykota

    r3411 r3413  
    99# the Free Software Foundation, either version 3 of the License, or 
    1010# (at your option) any later version. 
    11 #  
     11# 
    1212# This program is distributed in the hope that it will be useful, 
    1313# but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1414# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1515# GNU General Public License for more details. 
    16 #  
     16# 
    1717# You should have received a copy of the GNU General Public License 
    1818# along with this program.  If not, see <http://www.gnu.org/licenses/>. 
     
    3333from pykota.dumper import DumPyKota 
    3434 
    35 if __name__ == "__main__" :  
     35if __name__ == "__main__" : 
    3636    parser = PyKotaOptionParser(description=_("Data Dumper for PyKota."), 
    3737                                usage="dumpykota [options] [filterexpr]") 
    38                                  
    39     parser.add_option("-d", "--data",                             
     38 
     39    parser.add_option("-d", "--data", 
    4040                            dest="data", 
    4141                            help=_("Select the type of datas to dump. This option is mandatory. Supported data types are : history, payments, billingcodes, users, groups, printers, upquotas, gpquotas, umembers, pmembers, and all. The 'all' value forces the output format to XML.")) 
    42     parser.add_option("-f", "--format",                             
     42    parser.add_option("-f", "--format", 
    4343                            default="csv", 
    4444                            dest="format", 
    4545                            help=_("Select the output format, the default being comma separated values. Supported formats are : csv, ssv, tsv, xml and cups. The 'cups' output format only works when dumping the history, and produces CUPS' page_log compatible output.")) 
    46     parser.add_option("-o", "--output",                             
     46    parser.add_option("-o", "--output", 
    4747                            dest="output", 
    4848                            default=u"-", 
    4949                            help=_("The name of the file the data dump will be written to. The default value is '-', which tells dumpykota to write the dump to stdout.")) 
    50     parser.add_option("-O", "--orderby",                             
     50    parser.add_option("-O", "--orderby", 
    5151                            dest="orderby", 
    5252                            help=_("Change the ordering of the output based on a comma separated list of ordering statements. For example '-username,+printername' would sort the output by descending order of user names and ascending order of printer names. Not all expressions are supported, and you should not use this if you don't know the internal structure of PyKota's database." )) 
    53     parser.add_option("-s", "--sum",                             
     53    parser.add_option("-s", "--sum", 
    5454                            dest="sum", 
    5555                            action="store_true", 
    5656                            default=False, 
    5757                            help=_("Summarize the output. Only available when dumping the printing history or the payments.")) 
    58                                  
     58 
    5959    parser.add_filterexpression("username", _("User's name")) 
    6060    parser.add_filterexpression("groupname", _("Users group's name")) 
     
    6666    parser.add_filterexpression("start", _("Job's date of printing")) 
    6767    parser.add_filterexpression("end", _("Job's date of printing")) 
    68      
    69     parser.add_example('--unit EURO --output /tmp/invoices.pdf start=now-30',  
     68 
     69    parser.add_example('--unit EURO --output /tmp/invoices.pdf start=now-30', 
    7070                       _("This would generate a PDF document containing invoices for all users who have spent some credits last month. Amounts would be in EURO and not VAT information would be included.")) 
    7171 
    7272    parser.add_example("--data history --format csv >myfile.csv", 
    7373                       _("This would dump the whole printing history to stdout in the CSV format, and redirect the output to a file.")) 
    74    
     74 
    7575    parser.add_example("--data users --format xml -o users.xml", 
    7676                       _("This would dump all users into the 'users.xml' file in the XML format.")) 
    77    
     77 
    7878    parser.add_example("--data history printername=HP2100 username=jerome", 
    7979                       _("This would dump jerome's printing history on printer HP2100.")) 
    80    
     80 
    8181    parser.add_example("--data history start=200503 end=20050730234615", 
    8282                       _("This would dump all jobs printer between March 1st 2008 at midnight and July 30th 2008 at 23 hours 46 minutes and 15 seconds, included.")) 
    83     run(parser, DumPyKota)                    
     83    run(parser, DumPyKota)