Mechanical

Gutenberg

As far as I can tell from reading the archives and checking their Web site, Project Gutenberg does not appear to have an API. The closed I've found is an RSS feed and an RDF document. These don't really constitute and API, but the latter can be parsed for adding to an SQLite database. Still trying to figure this out, though. Trying to grab one version of their catalog in RDF format:

    gutenberg $ tar -xjf catalog.rdf.bz2
    tar: This does not look like a tar archive
    tar: Skipping to next header
    tar: Archive contains obsolescent base-64 headers
    tar: Error exit delayed from previous errors

I was able to unzip their .zip version of the same file, but I was disappointed to learn that their Perl examples are rather old and can stand some updating.

But why would you care? Because I think I want to make this happen:

    gutenberg --read "Art of War"

You know, sometimes I worry about posting neat ideas to use.perl for fear that someone would jump the gun and Just Do It. I realize now that this is foolish for two reasons. First, they Won't Just Do It. Second, if they did, I'd be happy just to have the project done :)

Suggestions welcome. There needs to be an easy way to update the database, track what a user has read, allow them to "bookmark" a book (or better yet, "annotate" a document"), etc. I've never used an eReader. I never gave a damn about them, really, because I like the feeling of a book in my hands. Still, this seems worthwhile.

  • Current Mood: curious curious
  • Current Music: Ministry | Nature of Love (Cruelty Mix)
Tags:
I suppose it depends on the tar, but I thought gnu tar just knew about gzip. For bzip2, I usually need the follow incantation:

bzip2 -dc | tar xvf -

As for the rest of your crazy plan, I'll just leave that as an exercise for you. :-D
Here's a suggestion, and excuse the ludditity (if that's a word): Go to the bookstore and read the fucking book. It will cost you like 2 pounds.

-Occam