-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathREADME
62 lines (38 loc) · 1.49 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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://purl.org/net/bagit
bagit.py is a standalone python module that you can drop into your
project as needed or you can install globally with:
python setup.py install
From python you can use the bagit module to make a bag like this:
import bagit
bag = bagit.make_bag('mydir', {'Contact-Name': 'Ed Summers'})
Or if you've got an existing bag
import bagit
bag = bagit.Bag('/path/to/bag')
Or from the command line:
bagit.py --contact-name 'Ed Summers' mydir
If you'd like to generate the checksums using parallel system processes,
instead of single process:
bagit.make_bag('mydir', {'Contact-Name': 'Ed Summers'}, processes=4)
or:
bagit.py --processes 4 --contact-name 'Ed Summers' mydir
bag --help will give the full set of options.
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
* 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 <[email protected]>
License
Public Domain <http://creativecommons.org/licenses/publicdomain/>