bagit-profiles / bagit-profiles-validator

A simple Python module for validating BagIt Profiles.
The Unlicense
12 stars 6 forks source link

Allow profile-validator to accept filepaths as well as URIs of BagIt Profiles #23

Closed helrond closed 4 years ago

helrond commented 4 years ago

In order to instantiate a profile, the profile validator currently accepts a URI at which the profile is available (as JSON). I'd like to allow the validator to also accept a filepath at which a profile is available, which would allow me to validate against a profile without going to the trouble of making it available over HTTP.

This may not be in compliance with the Bagit Profiles spec, which seems to state that the profile should be available at a URI, so I'd be interested in hearing from other maintainers whether this is a good idea or not!

tdilauro commented 4 years ago

@helrond This is already possible via the --file FILE option. For example, you can do something like:

  bagit_profile.py --file <file-with-profile-json> <uri-of-my-profile> <bag>

Try bagit_profile.py --help for available options.

helrond commented 4 years ago

Thanks @tdilauro - obviously I should have checked that first!