Changeset 3165 for pykota/trunk/bin

Show
Ignore:
Timestamp:
04/16/07 18:52:23 (18 years ago)
Author:
jerome
Message:

Added --orderby command line switch to dumpykota.
Doesn't work yet with the LDAP backend, since sorting will have
to be done by PyKota's code instead of relying on the database
backend itself to do the dirty work.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/dumpykota

    r3133 r3165  
    7878                       WARNING : existing files are truncated ! 
    7979 
     80  -O | --orderby exp   Change the ordering or result. 'exp' is a comma 
     81                       separated list of ordering statements, for example 
     82                       '--orderby +username,-printername'. Not all expression 
     83                       values are meaningful, so using this command line  
     84                       switch is not recommanded if you don't know the  
     85                       exact layout of PyKota's database schema. 
     86                        
    8087  -s | --sum           Summarize the selected datas. 
    8188                           ONLY AVAILABLE WITH --data history or payments 
     
    150157                     "output" : "-", \ 
    151158                   } 
    152         short_options = "vhd:f:o:s" 
    153         long_options = ["help", "version", "data=", "format=", "output=", "sum"] 
     159        short_options = "vhd:f:o:sO:" 
     160        long_options = ["help", "version", "data=", "format=", "output=", "sum", "orderby="] 
    154161         
    155162        # Initializes the command line tool 
     
    167174        options["output"] = options["o"] or options["output"] or defaults["output"] 
    168175        options["sum"] = options["s"] or options["sum"] 
     176        options["orderby"] = options["O"] or options["orderby"] 
    169177         
    170178        if options["help"] :