forked from rjeschmi/Archive-BagIt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
149 lines (86 loc) · 3.67 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
WARNING
This is experimental software for the moment and under active
development.
Under the hood, the module Archive::BagIt::Base was adapted and
extended to support BagIt 1.0 according to RFC 8493
([https://tools.ietf.org/html/rfc8493](https://tools.ietf.org/html/rfc8493)).
Also: Check out Archive::BagIt::Fast if you are willing to add some
extra dependencies to get better speed by mmap-ing files.
NAME
Archive::BagIt - An interface to make and verify bags according to the
BagIt standard
SYNOPSIS
This modules will hopefully help with the basic commands needed to
create and verify a bag. My intention is not to be strict and enforce
all of the specification. The reference implementation is the java
version and I will endeavour to maintain compatibility with it.
use Archive::BagIt;
#read in an existing bag:
my $bag_dir = "/path/to/bag";
my $bag = Archive::BagIt->new($bag_dir);
#construct bag in an existing directory
my $bag2 = Archive::BagIt->make_bag($bag_dir);
# Validate a BagIt archive against its manifest
my $bag3 = Archive::BagIt->new($bag_dir);
my $is_valid = $bag3->verify_bag();
SUBROUTINES
new
An Object Oriented Interface to a bag. Opens an existing bag.
my $bag = Archive::BagIt->new('/path/to/bag');
make_bag
A constructor that will make and return a bag from a directory
If a data directory exists, assume it is already a bag (no checking for
invalid files in root)
verify_bag
An interface to verify a bag.
You might also want to check Archive::BagIt::Fast to see a more direct
way of accessing files (and thus faster).
get_checksum
This is the checksum for the bag, md5 of the manifest-md5.txt
version
Returns the bagit version according to the bagit.txt file.
payload_files
Returns an array with all of the payload files (those files that are
below the data directory)
non_payload_files
Returns an array with files that are in the root of the bag,
non-manifest files
manifest_files
Return an array with the list of manifest files that exist in the bag
tagmanifest_files
Return an array with the list of tagmanifest files
AUTHORS
Robert Schmidt, <rjeschmi at gmail.com>
William Wueppelmann, <william at c7a.ca>
Andreas Romeyke, <pause at andreas minus romeyke.de>
CONTRIBUTORS
Serhiy Bolkun
Russell McOrmond
SOURCE
The original development version is on github at
http://github.com/rjeschmi/Archive-BagIt and may be cloned from there.
The actual development version is available at
https://art1pirat.spdns.org/art1/Archive-BagIt
BUGS
Please report any bugs or feature requests to bug-archive-bagit at
rt.cpan.org, or through the web interface at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Archive-BagIt. I will be
notified, and then you'll automatically be notified of progress on your
bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Archive::BagIt
You can also look for information at:
* RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Archive-BagIt
* AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Archive-BagIt
* CPAN Ratings
http://cpanratings.perl.org/d/Archive-BagIt
* Search CPAN
http://search.cpan.org/dist/Archive-BagIt/
COPYRIGHT
Copyright (c) 2012, the above named author(s).
LICENSE
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.