Sha256: 1006d860c496dcfcd60ec1a61d72a034e6215183ac4279e29192370aa820f4dc
Contents?: true
Size: 767 Bytes
Versions: 2
Compression:
Stored size: 767 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 " Language: #{rdf.language}" 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
gutenberg_rdf-1.0.0 | bin/rdf |
gutenberg_rdf-0.4.0 | bin/rdf |