Sha256: 13d61e4973b3d163385b006704402c01552910740c1f99d36463bd1750766a21

Contents?: true

Size: 779 Bytes

Versions: 1

Compression:

Stored size: 779 Bytes

Contents

#!/usr/bin/env ruby

$LOAD_PATH << File.expand_path(File.dirname(__FILE__) + '/../lib')

require "gutenberg_rdf"

unless ARGV.last && File.exist?(ARGV.last)
  puts
  puts "ERROR: Please provide the full path to an RDF file:\n\n$ bin/rdf /gutenberg/pg1.rdf"
  puts
  exit 1
end

rdf = GutenbergRdf.parse(ARGV.last)

puts "       ID: #{rdf.id}"
puts "     Type: #{rdf.type}"
puts "    Title: #{rdf.title}"
puts " Subtitle: #{rdf.subtitle}"
puts "  Authors: #{rdf.authors.join(', ')}"
puts "Published: #{rdf.published}"
puts "Languages: #{rdf.languages.join(', ')}"
puts "   Rights: #{rdf.rights}"
puts "Bookcover: #{rdf.covers.first}"
puts "   eBooks: \n#{rdf.ebooks.map{|b| "           #{b.uri}" }.join("\n")}"
puts " Subjects: \n           #{rdf.subjects.join("\n           ")}"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gutenberg_rdf-1.0.1 bin/gutenberg_rdf