Skip to main content

Create and extract BDRC bags

Project description

BDRC Bagging

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

Usage

 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!

Packaging BDRC Bag applications

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 functionality

(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.

Changelog

version commit description
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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

bdrc_bag-0.0.6-py3-none-any.whl (58.7 kB view details)

Uploaded Python 3

File details

Details for the file bdrc_bag-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: bdrc_bag-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 58.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.18

File hashes

Hashes for bdrc_bag-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b64b352ac79f93fd9559d89549b02db9a6728177d0ef603e5c0ab9f8646d6ccd
MD5 cbba28a0b8a57bbd78b1868fd04331eb
BLAKE2b-256 42a94ddaca3a68a13536616996c0e32adb8d580061b816d8a7f00e863bbc1482

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page