Merge pull request #1 from ranulf/cmdline-switches

Add short variants to some long options.
This commit is contained in:
novoid 2014-12-16 13:10:26 +01:00
commit 77eff4da53
3 changed files with 12 additions and 13 deletions

View file

@ -15,7 +15,7 @@ minutes, and seconds is not a colon but a dot. Colons are causing
several problems on different file systems and are there fore replaced
with the (older) DIN 5008 version with dots.
: Usage:
: Usage:
: date2name [options] file ...
Run "date2name --help" for usage hints
@ -24,9 +24,9 @@ Run "date2name --help" for usage hints
: -h, --help show this help message and exit
: -d, --directories modify only directory names
: -f, --files modify only file names
: --compact use compact datestamp (YYYYMMDD)
: --month use datestamp with year and month (YYYY-MM)
: --withtime use datestamp including seconds (YYYY-MM-DDThh.mm.ss)
: -C, --compact use compact datestamp (YYYYMMDD)
: -M, --month use datestamp with year and month (YYYY-MM)
: -w, --withtime use datestamp including seconds (YYYY-MM-DDThh.mm.ss)
: -m, --mtime take modification time for datestamp [default]
: -c, --ctime take creation time for datestamp
: -q, --quiet do not output anything but just errors on console

View file

@ -63,13 +63,13 @@ parser.add_option("-d", "--directories", dest="onlydirectories",
parser.add_option("-f", "--files", dest="onlyfiles",
action="store_true",
help="modify only file names")
parser.add_option("--compact", dest="compact",
parser.add_option("-C", "--compact", dest="compact",
action="store_true",
help="use compact datestamp (YYYYMMDD)")
parser.add_option("--month", dest="month",
parser.add_option("-M", "--month", dest="month",
action="store_true",
help="use datestamp with year and month (YYYY-MM)")
parser.add_option("--withtime", dest="withtime",
parser.add_option("-w", "--withtime", dest="withtime",
action="store_true",
help="use datestamp including seconds (YYYY-MM-DDThh.mm.ss)")
# parser.add_option("-r", "--remove", dest="remove",

View file

@ -23,7 +23,7 @@ Executed with an examplefilename "file" this results e.g. in "2008-12-31_file"
if the 31st of december 2008 is the modification time of the file.
If an existing timestamp is found, its style will be converted to the selected
ISO datestamp format but the numbers stays the same.
ISO datestamp format but the numbers stays the same.
Executed with an examplefilename "20071130-file", date2name reformats the
existing datestamp to the (default) datestamp format. In this example it
@ -50,15 +50,15 @@ names (including links).
Modify only file names including links. Default is: modify directory names as
well as file names.
*--compact*::
*-C* *--compact*::
Use compact datestamp format: YYYYMMDD
*--month*::
*-M* *--month*::
Use datestamp format with year and month: YYYY-MM
*--withtime*::
*-w* *--withtime*::
Use long datestamp format including timestamp: YYYY-MM-DDThh.mm.ss
@ -75,7 +75,7 @@ Use creation time for generating new datestamps.
Do not output anything but just errors on console.
*-v*, *--verbose*::
Be verbose when writing output. Good for investigating unwanted behaviour in
combination with dryrun mode.
@ -141,4 +141,3 @@ Please report feedback, bugreports and wishes <<X7,to the author>>.
Author
------
Karl Voit <tools@Karl-Voit.at>