Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Order options alphabetically #21

Merged
merged 1 commit into from

2 participants

@jaalto

Signed-off-by: Jari Aalto jari.aalto@cante.net

@jaalto jaalto Order options alphabetically
Signed-off-by: Jari Aalto <jari.aalto@cante.net>
c6f3205
@jaalto

The above pull request adds options in certain order for the parser, so that the help listing is displayed alphabetically:

--help

See e.g. cp(1), mv(1) in GNU programs for option order
http://www.gnu.org/software/coreutils/manual/html_node/cp-invocation.html

@dilshod dilshod merged commit b5a1978 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 13, 2012
  1. @jaalto

    Order options alphabetically

    jaalto authored
    Signed-off-by: Jari Aalto <jari.aalto@cante.net>
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 4 deletions.
  1. +4 −4 xlsx2csv.py
View
8 xlsx2csv.py
@@ -376,18 +376,18 @@ def convert_recursive(path, kwargs):
if __name__ == "__main__":
parser = OptionParser(usage = "%prog [options] infile [outfile]", version="0.11")
- parser.add_option("-s", "--sheet", dest="sheetid", default=1, type="int",
- help="sheet no to convert (0 for all sheets)")
parser.add_option("-d", "--delimiter", dest="delimiter", default=",",
help="delimiter - csv columns delimiter, 'tab' or 'x09' for tab (comma is default)")
- parser.add_option("-p", "--sheetdelimiter", dest="sheetdelimiter", default="--------",
- help="sheets delimiter used to separate sheets, pass '' if you don't want delimiters (default '--------')")
parser.add_option("-f", "--dateformat", dest="dateformat",
help="override date/time format (ex. %Y/%m/%d)")
parser.add_option("-i", "--ignoreempty", dest="skip_empty_lines", default=False, action="store_true",
help="skip empty lines")
+ parser.add_option("-p", "--sheetdelimiter", dest="sheetdelimiter", default="--------",
+ help="sheets delimiter used to separate sheets, pass '' if you don't want delimiters (default '--------')")
parser.add_option("-r", "--recursive", dest="recursive", default=False, action="store_true",
help="convert recursively")
+ parser.add_option("-s", "--sheet", dest="sheetid", default=1, type="int",
+ help="sheet no to convert (0 for all sheets)")
(options, args) = parser.parse_args()
Something went wrong with that request. Please try again.