Skip to content

EmmanuelOga/risbn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

risbn

Minimal set of tools for working with isbns from ruby.

Supports both isbn-10 and isbn-13.

Provides a simple (barebones) tool for extracting isbns from pdf and chm files.

Provides barebones google data integration for retrieving all sorts of information from the isbn.

Examples:

require 'isbn'
isbn = RISBN.parse_first("Some text with and isbn: ISBN-13: 978-0393317732") # => <RISBN isbn="9780393317732">
isbn.valid? # => true

require 'risbn/scanner'
RISBN::Scanner.scan("some/file.pdf")
RISBN::Scanner.scan("some/file.chm")
RISBN::Scanner.scan("some/file.txt")

require 'risbn/gdata'
RISBN::GData("978-0393317732").data        # <OpenStruct self_url="http://www.google.com/books/feeds/volumes/kom8GwAACAAJ", ...
RISBN::GData("978-0393317732").data.rating # => 3.0

# ...

Notes

The chm/pdf extraction only works on unix like platforms currently and requires the following tools for scanning files:

  • Poppler for pdf (pdftotext utility)

  • Archmage for chm

Note on Patches/Pull Requests

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request. Bonus points for topic branches.

Copyright © 2010 Emmanuel Oga. See LICENSE for details.

About

ruby utils for handling isbn numbers.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages