Coder Social home page Coder Social logo

bagit's Introduction

gobagit

gobagit is a command line tool to work with the BagIt format

Wikipedia: https://en.wikipedia.org/wiki/BagIt

IETF: https://tools.ietf.org/html/rfc8493

Build Status codecov Go Report Card Quality Gate Status

Version: 0.4.0

Usage examples

Create a simple bag:

gobagit -create testinputdir

Create a bag with some possible commandline options

gobagit -create testinputdir -output outbagdir -tar -hash sha1 -header headerfile.json

Create a bag with all possible commandline options

gobagit -create testinputdir -output outbagdir -tar -hash sha1 -header headerfile.json -fetch fetch.txt -manifetch fetchmanifest.txt -tagmanifest sha512

Validate a bag

gobagit -validate bagdir/

Pass additional headers as a json file, no nesting supported. Example:

{
    "Source-Organization": "FOO University",
    "Contact-Email":"[email protected]"
}

Commandline options:

-create PATH_TO_DIR
    Create bag. Expects path to source directory
-fetch string
    Adds optional fetch file to bag. Expects path to fetch.txt file and switch manifetch
-hash ALGORITHM
    Hash algorithm used for manifest file when creating a bag [sha1, sha256, sha512, md5] (default "sha512")
-header PATH_TO_FILE
    Additional headers for bag-info.txt. Expects path to json file
-manifetch string
    Path to manifest file for optional fetch.txt file. Mandatory if fetch switch is used
-output PATH_TO_DIR
    Output directory for bag. Used with create flag (default "bag_2019-06-11T225839")
-tagmanifest ALGORITHM
    Hash algorithm used for tagmanifest file when creating a bag [sha1, sha256, sha512, md5] (default "sha512")
-tar
    Create a tar archive when creating a bag
-v    Verbose output
-validate PATH_TO_BAG
    Validate bag. Expects path to bag
-version
    Print version

Installation

From source

go get github.com/steffenfritz/bagit/cmd/gobagit

Binary

Download a pre-built binary from the releases page.

Limitations

  1. Only one payload manifest file is supported in version 0.4.0
  2. No additional tag directories are supported in version 0.4.0
  3. Issues page https://github.com/steffenfritz/bagit/issues
  4. When creating a bag fetch does NOT validate if the provided hashes match the hash algorithm for the bag's manifest

bagit's People

Contributors

steffenfritz avatar j-panzer avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.