Updated help text
This commit is contained in:
parent
dec5078f03
commit
d010524e6b
24
README.rst
24
README.rst
|
@ -31,6 +31,30 @@ To extract all non SYS files while converting to lower case, use::
|
|||
File #8 : *ASTEROIDS 066 : copying to asteroid.s
|
||||
|
||||
|
||||
Command Line Help
|
||||
-----------------
|
||||
|
||||
The built-in help in accessed with the standard ``--help`` argument::
|
||||
|
||||
$ python atrcopy.py --help
|
||||
usage: atrcopy.py [-h] [-v] [-l] [--dry-run] [-n] [-x] [--xex] ATR [ATR ...]
|
||||
|
||||
Extract images off ATR format disks
|
||||
|
||||
positional arguments:
|
||||
ATR an ATR image file [or a list of them]
|
||||
|
||||
optional arguments:
|
||||
-h, --help show this help message and exit
|
||||
-v, --verbose
|
||||
-l, --lower convert filenames to lower case
|
||||
--dry-run don't extract, just show what would have been extracted
|
||||
-n, --no-sys only extract things that look like games (no DOS or .SYS
|
||||
files)
|
||||
-x, --extract extract files
|
||||
--xex add .xex extension
|
||||
|
||||
|
||||
Example on Mac OS X
|
||||
-------------------
|
||||
|
||||
|
|
13
atrcopy.py
13
atrcopy.py
|
@ -235,14 +235,15 @@ if __name__ == "__main__":
|
|||
|
||||
parser = argparse.ArgumentParser(description="Extract images off ATR format disks")
|
||||
parser.add_argument("-v", "--verbose", default=0, action="count")
|
||||
parser.add_argument("-l", "--lower", action="store_true", default=False, help="Convert filenames to lower case")
|
||||
parser.add_argument("--dry-run", action="store_true", default=False, help="Don't extract, just show what would have been extracted")
|
||||
parser.add_argument("-n", "--no-sys", action="store_true", default=False, help="Only extract things that look like games (no DOS or .SYS files)")
|
||||
parser.add_argument("-x", "--extract", action="store_true", default=False, help="Extract files")
|
||||
parser.add_argument("--xex", action="store_true", default=False, help="Add .xex extension")
|
||||
parser.add_argument("-l", "--lower", action="store_true", default=False, help="convert filenames to lower case")
|
||||
parser.add_argument("--dry-run", action="store_true", default=False, help="don't extract, just show what would have been extracted")
|
||||
parser.add_argument("-n", "--no-sys", action="store_true", default=False, help="only extract things that look like games (no DOS or .SYS files)")
|
||||
parser.add_argument("-x", "--extract", action="store_true", default=False, help="extract files")
|
||||
parser.add_argument("--xex", action="store_true", default=False, help="add .xex extension")
|
||||
parser.add_argument("files", metavar="ATR", nargs="+", help="an ATR image file [or a list of them]")
|
||||
options, extra_args = parser.parse_known_args()
|
||||
|
||||
for args in extra_args:
|
||||
for args in options.files:
|
||||
print args
|
||||
with open(args, "rb") as fh:
|
||||
atr = AtrDiskImage(fh)
|
||||
|
|
Loading…
Reference in New Issue