Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

ruby utils for handling isbn numbers.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .document
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
Octocat-spinner-32 VERSION
Octocat-spinner-32 risbn.gemspec
README.rdoc

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

Copyright © 2010 Emmanuel Oga. See LICENSE for details.

Something went wrong with that request. Please try again.