View Single Post
Old 10-25-2008, 07:07 PM   #1
RoninTech
Groupie
RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.
 
RoninTech's Avatar
 
Posts: 168
Karma: 1000036
Join Date: Oct 2008
Location: Citizen of the World
Device: iPod Touch, Nook Colour, Kobo Touch, Kobo Glo, Nexus 7, Nexus 5, Pixel
Script to Generate Stanza Online Catalog for your Iphone/Touch

This perl script lets you generate an atom feed from your Calibre library. If you use Stanza on an iPhone or iPod Touch it lets you access/transfer all of your epub books over wifi without having to use the Stanza desktop. At some point I'm sure Kovid can add this functionality into Calibre so you can just press a button rather than having to run this script. Right now it uses the calibredb command line utility to grab all of the info to generate the feed.

The resulting atom feed XML file is placed at the root of the calibre library. If you mount or copy your calibre library directory into your webserver's directory tree you can then access all the epubs in your library over wifi.

On your iphone/touch you just need to go under Settings->Stanza->Advanced and change "Primary Online Catalog" to point to the generated xml file on your webserver. I have a stanza.xml that includes all the original libraries plus a new entry that references the generated feed for my calibre library. So now all I have to do is add my books into Calibre, convert them to epub and run this script. I originally tried to include the Comment meta field in the content info but couldn't get it to output without column formatting that matched the line-spacing arg I was passing to calibredb. Its tested on Windows but should work on Linux and Mac as well as long as you have a Perl interpreter. On windows you can use the free Cygwin or Activestate Perl implementations.

All the info needed came from these places:

http://www.lexcycle.com/developer
http://diveintomark.org/archives/200.../howto-atom-id
http://validator.w3.org/feed/#validate_by_input

Hope it might help any other iPhone/Touch Stanza users looking to manage their book library with Calibre.

Cheers,
Crazy
Attached Files
File Type: zip calibre2stanzaatom.zip (2.9 KB, 946 views)
RoninTech is offline   Reply With Quote