Open jmccdev opened 2 years ago
Both the verify
and the create
commands have an option -sf PATH
or --single_file PATH
to verify or add single files (you can have multiple -sf PATH
options in one call). These options are implemented as additional options of the verify
and the create
commands which require also a root path of the ASC MHL History to be passed in.
This is not the most elegant solution, but the current command line parsing framework Click
does not allow to make the root path mandatory for some options and optional for other options (such as the -sf PATH
option). We looked at this already, but it would have been a major refactoring and/or redesign of the commands in order to fix this.
So to verify a single file use..
% ascmhl verify -v -sf /path/to/root-folder/and/file.txt /path/to/root-folder
... and add a single file use...
% ascmhl create -v -sf /path/to/root-folder/and/file.txt /path/to/root-folder
As this is more a design question (and the feature works for now as described above and documented with the --help
option) I would propose to add a "postpone" tag to this issue for now. I also refined the title of the issue.
The data used for this is under
/sources/104_verification_types/104n/
within the dataset on the G-Drive: https://drive.google.com/drive/folders/1PrAPczRFBQsVfjakbX-fqnDVHsAD-kd1I created the ASC MHL History with:
ascmhl create -h md5 16421225_Day001/
Using the
verify
command on a single file in that dataset results in aMissing ASC MHL History
error:Using the
create
command on a single file in that dataset, in order to verify it AND create a new MHL generation to record that verification, results in aNotADirectoryError
:Maybe it is unreasonable for the
ascmhl
tool to transverse up the directory tree until it finds anascmhl
directory, so maybe the tool could allow you to specify the location of the appropriate ASC MHL History when trying to verify a single file, or a subset of data.