This provides a command line interface in the script archive-tool.py that implements the basic functionality. The script provides the create, verify, ls, info, and check subcommands. This closes #1 and closes #2.
There are still a few things to do before merging to master though:
[x] better error handling: at the moment exceptions are not caught, so the script dumps a trace if something goes wrong.
[x] the default compression used in the create subcommand should be derived from the archive file name rather then be hard coded to gz.
[x] add a --format option with choices ls and checksum to the ls subcommand. At the moment, the only output format is ls style. Should add checksum output format that is suitable to pipe into sha256sum -c.
[X] consider adding the option that the verify, ls, info, and check subcommands read a directory that is assumed to have been created by extracting an archive (e.g. read the manifest file therein) rather then an archive file. This idea has been moved into a separate issue #18 and will not be implemented as part of this PR.
[x] complete test covering: tests for error handling and the check subcommand are still missing, as well as obviously tests for not yet implemented features from this list. Should also test the defaults for optional command line arguments.
This provides a command line interface in the script
archive-tool.py
that implements the basic functionality. The script provides thecreate
,verify
,ls
,info
, andcheck
subcommands. This closes #1 and closes #2.There are still a few things to do before merging to master though:
create
subcommand should be derived from the archive file name rather then be hard coded togz
.--format
option with choicesls
andchecksum
to thels
subcommand. At the moment, the only output format isls
style. Should addchecksum
output format that is suitable to pipe intosha256sum -c
.consider adding the option that theThis idea has been moved into a separate issue #18 and will not be implemented as part of this PR.verify
,ls
,info
, andcheck
subcommands read a directory that is assumed to have been created by extracting an archive (e.g. read the manifest file therein) rather then an archive file.check
subcommand are still missing, as well as obviously tests for not yet implemented features from this list. Should also test the defaults for optional command line arguments.