buda-base / asset-manager

Asset Manager and audit tool
The Unlicense
0 stars 0 forks source link

Add options or properties flag #164

Closed jimk-bdrc closed 2 years ago

jimk-bdrc commented 2 years ago

There's a need to pass property values at run time to audit-tool. A use case for this is: We run one version of audit-tool on a server. One service wants to make sure that BUDA can process the images, so it requires that there be no thumbnails in the images/ images, which go the the web. Another service wants to run audit-tool for another DIP, who doesn't care about thumbnails.

The properties to determine what test failures are warnings live only in the site properties ($INSTALL_DIR/bin/shell.properties) and in each user's properties. (~/.config/bdrc/auditTool/user.properties)

In the above case these files cannot be changed, as the two runtimes might be running simultaneously.

Also, It was not allowed to override the location of the user.properties file at command line run time.

We should pass in options on the command line. We can either do a single flag, with options separated by a delimiter (which gets into shell delimiter issues, which can be worked around by quoting the sequence, such as:

-o "ErrorsAsWarnings=1,2,3,4;MaximumImageFileSize=20K"

or allowing multiple flag instances, like other system utilities (see mount(8))

-o ErrorsAsWarnings=1,2,3,4 -o MaximumImageFileSize=20K

We should also allow overriding the user profile file definition with the define flag -D UserConfigPath=some_other_file

jimk-bdrc commented 2 years ago

I need to set up automation to track pull requests and being moved into Done.