View Single Post
Old 10-13-2008, 11:53 AM   #7
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
As I wait for the CSV option update to calibredb I had a thought . Rather than me running an external script using the new features in calibredb would it be out of line for me to ask for a feature request for an option for Calibre to generate an atom feed XML file for its catalog? This would mean any iPhone/Touch Stanza user could access their Calibre ebook collection on their own device by having the Calibre library on a web server along with this generated XML atom feed. Stanza's catalog atom feed format is pretty straight forward. Here's an example I whipped up that works on my iTouch:

PHP Code:
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <
title>Calibre Generated Stanza Catalog</title>
  <
id>tag:mywebserver,2008-10-12:/ebooks/stanza.xml</id>
  <
updated>2008-10-12T00:44:20+00:00</updated>
  <
link rel="self" type="application/atom+xml" href="http://mywebserver/ebooks/stanza.xml"/>
  <
author>
    <
name>Crazy</name>
    <
uri>http://mywebserver</uri>
    
<email>librarian@mydomain.com</email>
  </
author>
  <
entry>
    <
title>20000 Leagues Under The Sea</title>
    <
content type="xhtml">
      <
div xmlns="http://www.w3.org/1999/xhtml"Published1870 SubjectNovels Languageen</div>
    </
content>
    <
id>tag:mywebserver,2008-10-12:/ebooks/Jules%20Verne/20000%20Leagues%20Under%20the%20Sea%20(2)/20000%20Leagues%20Under%20the%20Sea%20-%20Jules%20Verne.epub</id>
    <
author>
      <
name>VerneJules</name>
    </
author>
    <
updated>2008-10-12T00:44:20+00:00</updated>
    <
link type="application/epub+zip" href="http://mywebserver/ebooks/Jules%20Verne/20000%20Leagues%20Under%20the%20Sea%20(2)/20000%20Leagues%20Under%20the%20Sea%20-%20Jules%20Verne.epub"/>
    <
link rel="x-stanza-cover-image-thumbnail" type="image/jpg" href="http://mywebserver/ebooks/Jules%20Verne/20000%20Leagues%20Under%20the%20Sea%20(2)/cover.jpg"/>
    <
link rel="x-stanza-cover-image" type="image/jpg" href="http://mywebserver/ebooks/Jules%20Verne/20000%20Leagues%20Under%20the%20Sea%20(2)/cover.jpg"/>
  </
entry>
  <
entry>
    <
title>The Time Machine</title>
    <
content type="xhtml">
      <
div xmlns="http://www.w3.org/1999/xhtml"Published1895 SubjectNovels Languageen</div>
    </
content>
    <
id>tag:mywebserver,2008-10-12:/ebooks/H%20G%20Wells/The%20Time%20Machine%20(8)/The%20Time%20Machine%20-%20H%20G%20Wells.epub</id>
    <
author>
      <
name>WellsH G</name>
    </
author>
    <
updated>2008-10-12T00:55:20+00:00</updated>
    <
link type="application/epub+zip" href="http://mywebserver/ebooks/H%20G%20Wells/The%20Time%20Machine%20(8)/The%20Time%20Machine%20-%20H%20G%20Wells.epub"/>
    <
link rel="x-stanza-cover-image-thumbnail" type="image/jpg" href="http://mywebserver/ebooks/H%20G%20Wells/The%20Time%20Machine%20(8)/cover.jpg"/>
    <
link rel="x-stanza-cover-image" type="image/jpg" href="http://mywebserver/ebooks/H%20G%20Wells/The%20Time%20Machine%20(8)/cover.jpg"/>
  </
entry>
</
feed
The majority of the info in this xml file would be available to Calibre as it sits except for the web server base URL and the catalog owner's name and email address. The only other thing would be to replace the spaces in the url's with %20's. I think more info can be provided by an entry's content->div but I haven't played with it yet. Let me know what you think about supporting iphone/Touch's in Calibre via this atom feed route and if you agree I'll add a feature request. Otherwise I'll do this as I originally planned, in an external script via the updated calibredb.

It ends up looking like the attached ipod Touch screenshot.

Crazy

RoninTech is offline   Reply With Quote