github.com/pkalwak/bagins@v0.0.0-20210317172317-694ac5ce2f54/README.md (about)

     1  [![Build Status](https://travis-ci.org/APTrust/bagins.png)](https://travis-ci.org/APTrust/bagins)
     2  
     3  BagIns - BagIt Library in Go
     4  ============================
     5  
     6  This is a library for working with `BagIt <http://en.wikipedia.org/wiki/BagIt>`_
     7  hierarchal file packages.
     8  
     9  It uses the `Go Language <http://golang.org/>`_ to leverage its speed and concurrency features to take advantage of
    10  manipulating bags in a cloud based enviorment.
    11  
    12  I'm fairly new to the Go Language so excuse the prototype nature of the code in general.
    13  
    14  **GoDocs For This Project:** http://godoc.org/github.com/APTrust/bagins
    15  
    16  Installation
    17  ------------
    18  
    19  This package is "go get-able" so simply import the package via
    20  'github.com/APTrust/bagins' or use
    21  the [go get](http://golang.org/cmd/go/#hdr-Download_and_installpackages_and_dependencies)
    22  command directly as follows::
    23  
    24  	go get github.com/APTrust/bagins
    25  
    26  Modifying The Code
    27  ------------------
    28  
    29  To keep this project "go get-able" you will need to create the top level directories under your go source directory and
    30  then checkout the code into it like so::
    31  
    32  Switch to your Go source directory:
    33  
    34  	cd $GOPATH/src
    35  
    36  Create the parent directories:
    37  
    38  	mkdir -p github.com/APTrust
    39  
    40  Switch to the directory you just created:
    41  
    42  	cd github.com/APTrust
    43  
    44  Checkout the source code via git:
    45  
    46  	git clone https://github.com/APTrust/bagins.git
    47  
    48  Usage
    49  -----
    50  
    51  The Library is still under development, there is basic code for formatting and writing Manifest and Tag files as well as
    52  utilities for file checksumming files. Soon I'll tie it all together with a basic bag creation code. I'll post examples
    53  of it here when complete.
    54  
    55  Command Line Executable
    56  -----------------------
    57  
    58  This library includes a command line executable in the directory github.com/APtrust/bagins/bagmaker
    59  
    60  Assuming you have checked out the code to your GOPATH, to build and compile this just execute::
    61  
    62  	>go install $GOPATH/src/github.com/APTrust/bagins/bagmaker/bagmaker.go
    63  
    64  If you have GOBIN set this will deposite a compile file called *bagmaker* into your GOBIN directory.
    65  
    66  Usage:
    67  ./bagmaker -dir <value> -name <value> -payload <value> [-algo <value>]
    68  
    69  Flags:
    70  
    71  	-algo <value> Checksum algorithm to use.  md5, sha1, sha224, sha256, 
    72  	              sha512, or sha384.
    73  
    74  	-dir <value> Directory to create the bag.
    75  
    76  	-name <value> Name for the bag root directory.
    77  
    78  	-payload <value> Directory of files to parse into the bag