Permalink
Browse files

usual stuff

  • Loading branch information...
1 parent 31d62c2 commit 4159fcf4ca857478afefbaafaa157640120cdf91 @flazz flazz committed Feb 17, 2009
Showing with 76 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +21 −0 LICENSE.txt
  3. +40 −0 README.markdown
  4. +14 −0 bagit.gemspec
View
@@ -2,3 +2,4 @@
*~
.#*
\#*#
+*.gem
View
@@ -0,0 +1,21 @@
+The MIT License
+
+Copyright (c) 2009 Francesco Lazzarino
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
View
@@ -0,0 +1,40 @@
+# BagIt (for ruby) #
+
+Based on the <a
+href="http://www.cdlib.org/inside/diglib/bagit/bagitspec.html">BagIt
+spec v0.95</a>.
+
+## Supported Features: ##
+* bag compiling
+* manifest & tagmanifest generation
+* generation of tag files package-info.txt and bagit.txt
+* fetching remote files (fetch.txt)
+* bag validation
+
+## Example: making a bag ##
+ require 'bagit'
+
+ # make a new bag at base_path
+ bag = BagIt::Bag.new base_path
+
+ # make a new file
+ bag.add_file("samplefile") do |io|
+ io.puts "Hello Bag!"
+ end
+
+ # generate the manifest and tagmanifest files
+ bag.manifest!
+
+## Example: validating an existing bag ##
+ bag = BagIt::Bag.new existing_base_path
+
+ if bag.valid?
+ puts "#{existing_base_path} is valid"
+ else
+ puts "#{existing_base_path} is not valid"
+ end
+
+## TODO ##
++ command line tools for common tasks
++ better holy bag (fetch.txt) generation
++ better error reporting
View
@@ -0,0 +1,14 @@
+Gem::Specification.new do |spec|
+ spec.name = "bagit"
+ spec.version = '0.0.0'
+ spec.summary = "BagIt package generation and validation"
+ spec.email = "flazzarino@gmail.com"
+ spec.authors = ["Francesco (franco) Lazzarino"]
+ spec.files = ["Rakefile", "bagit.gemspec",
+ "lib/bagit/fetch.rb",
+ "lib/bagit/file.rb",
+ "lib/bagit/manifest.rb",
+ "lib/bagit/packageinfo.rb",
+ "lib/bagit/string.rb",
+ "lib/bagit.rb"]
+end

0 comments on commit 4159fcf

Please sign in to comment.