Uses the Library of Congress bag standard, implemented by the python bagit
project bagit 1.8.1 to create and unpack bags of BDRC works.
Hyper important. The build system has changed:
pip install --upgrade build
python -m build --wheel
The setup.py
is deprecated. The new build system is pyproject.toml
❯ bdrc-bag --help
usage: -[d|b] [-p] [-t] src dst
Unzips a LOC Bag, validates it, and extracts the payload
positional arguments:
src Source directory, if bagging, source zip if debagging
dst if bagging, container for zipped bag. If debagging, container for work
options:
-h, --help show this help message and exit
-d, --debag unzip and debag
-b, --bag bag and zip
-v, --verbose Verbose
-p, --preserve Preserve Original Source
-t TEMPDIR, --tempdir TEMPDIR
Override system temporary directory. Created if not exists
-i, --in-daemon We're in a daemon, so don't multiprocess - DONT USE ON COMMAND LINE!
BDRC has been packaging its internal utilities as pip
modules,
but you can build and ship standalone modules which contain all their requirements.
They get large, so we'd have to package multiple commands into a module. Since you can only specify one entry point (unlike pip, where you can emit many commands using the same module, you can only have one entry point per archive,
To build a standalone executable, you run two programs in the bdrc-bag
directory:
./setup-bag-build.sh
which prepares the executable's self-contained runtime environment
./build-bag-exe.sh` which builds the executable
(Deprecated) - Direct file system access on Synology NAS is unknown - SYnology embeds their share control files in the target file systems. Installing bdrc-bag utility on Synology NAS
- install Python3 package using DSM
- Connect to your Synology NAS through ssh
- Install pip
- wget https://bootstrap.pypa.io/get-pip.py
- sudo python3 get-pip.py
- Script will let you know where 'pip' is now installed. Make sure to add to your PATH.
version | commit | description |
---|---|---|
0.0.07 | 67985c1 | fix error handling bug |
0.0.06 | b6b0f13 | transition to standalone and pyproject.toml installation |
0.0.04 | d9d656df | Incrementally add a bag to its zip |
0.0.03 | ec875566 | Support single process to run in docker |