This package can be used to create BagIt style packages programmatically
in Python or from the command line.  More about BagIt can be found at:

  http://tools.ietf.org/html/draft-kunze-bagit 

For example if Callimachus at the Library of Alexandria wanted to 
create a bag out of a directory of images called 'pinakes' he could:

  bag --source-organization "Library of Alexandria" \
      --contact-name Callimachus \
      --contact-email callimachus@example.org \
      pinakes

or from python:

  import bagit
  bag_info = {
           'Source-Organization': 'Library of Alexandria',
           'Contact-Name': 'Callimachus',
           'Contact-Email': 'callimachus@example.org'
         }
  bagit.make_bag('pinakes', bag_info=bag_info)

If you'd like to generate the checksums using parallel system processes, 
instead of single process use the --processes flag:

  bag --processes 4 pinakes

or, from python:

  bagit.make_bag('pinakes', bag_info=bag_info, processes=4) 

bag --help will give the full set of options.

Installation

    % easy_install bagit

or if you prefer:

  % git clone git://github.com/edsu/bagit.git
  % cd bagit
  % sudo python setup.py install

Development

  % git clone git://github.com/edsu/bagit.git
  % cd bagit 
  % python test.py

If you'd like to see how increasingl parallelization of bag creation on 
your system effects the time to create a bag try using the included bench 
utility:

  % ./bench.py

TODO:

  * define the return value of make_bag
  * auto-generate Payload-Oxum
  * remove unix dependency on 'mv'
  * add validation
  * write manifest to tmp file first before moving stuff around, so that 
    if the manifest generation throws an exception the bag directory
    will be left untouched

Contact

Ed Summers <ehs@pobox.com>

License

Public Domain <http://creativecommons.org/licenses/publicdomain/>
