Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Related Tools

Notices

Reply
 
Thread Tools Search this Thread
Old 11-16-2009, 05:40 AM   #1
dpierron
calibre2opds guru
dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.
 
dpierron's Avatar
 
Posts: 532
Karma: 8792
Join Date: Aug 2005
Location: Metz, France
Device: iPhone, iPad, PRS-650
Thumbs up [Old Thread] Calibre + Dropbox = unclouded happiness

NEW The tool is now called calibre2opds and it has its own website, and thread here on MobileRead...

NEW I programmed a tool based on Calibre2Web that can be used on all platforms (Windows, Macs and Unixes) to generate the Stanza catalogs.

It is hosted on Sourceforge and I intend on updating it often, so please join the project and make requests !

-------------------------------------------


I'm pretty sure a lot of people here know Dropbox, the (free at first) file sharing and synchronization service...

I use it to sync the files on my two Macs, and my work PC ; it's a very easy to use and efficient service.

Recently, I began syncing my Calibre library, so the books I edit/add/remove on either machine would be available on all the others ; Calibre is a multi-platform marvel, so this syncing makes a lot of sense.

And I thought of something : if I generate the stanza.xml file from the Calibre database (using the calibre-db command), maybe it could be automatically accessible from my iPhone, now that the whole Calibre library is synchronized and available on my Dropbox account ?

Guess what ? It works ! Unfortunately, it's still a manual process, but I'm pretty sure it could be possible for our generous Kovid to change it into something automatic...

Here are the steps needed to make this happen :
  1. Publish your Calibre library in a directory of the Public part in your Dropbox account

    The library must be in a public part of your Dropbox account, because you will need the URL to the stanza.xml file in the last step. If you do not want to make it public, you will still be able to browse your (private) dropbox account website from inside Stanza, but it's another story...

    To get the URL to your Calibre library, simply right-click on a file in the folder and select "Copy public link" from the "Dropbox" menu ; let's call this URLTOSHAREDCALIBRELIBRARY : mine is http://dl.dropbox.com/u/788541/calib...ary/stanza.xml (fake number, of course).

  2. export the Calibre database into a stanza.xml file
    We need to use the calibredb program, located in the Calibre program folder ; find out the path to this file ; let's call it PATHTOCALIBREDB (use french quotes around it if there are spaces in it) : mine is "c:\Program Files\Calibre2\calibredb.exe".

    Then, we need the path to the Calibre library folder ; let's call it CALIBRELIBRARYFOLDER (again, use french quotes around it if there are spaces in it) : mine is "c:\data\dropbox\My Dropbox\Public\calibre_library"

    Here is the command used to generate the stanza.xml file :

    PATHTOCALIBREDB list --output-format stanza --prefix URLTOSHAREDCALIBRELIBRARY > CALIBRELIBRARYFOLDER\stanza.xml

    (replace the variables with the ones we discussed earlier)

    As an example, here is the command line I am using :

    "c:\Program Files\Calibre2\calibredb.exe" list --output-format stanza --prefix http://dl.getdropbox.com/u/788541/calibre_library > "c:\data\dropbox\My Dropbox\Public\calibre_library\stanza.xml"

  3. correct the stanza.xml file

    Some characters are encoded in a way that make Stanza frown : simply replace them using a plain text editor ; replace '%28' with '(' and '%29' with ')' (skip the quotes, obviously).

  4. configure your Stanza program to make it access your new online library

    In Stanza (on your iPhone for example), create a new online stanza catalog and enter the URL to your stanza.xml file ; this URL is URLTOSHAREDCALIBRELIBRARY/stanza.xml : mine is http://dl.dropbox.com/u/788541/calib...ary/stanza.xml.

That's all !

Of course, if the stanza.xml file could be generated automatically with every modification of the database, it would be even better, but even now it's very convenient...

Thanks again Kovid for Calibre, the Lexycle people for Stanza and Dropbox for being free...

PS : if I made a mistake in my explanation, or if something was not clear enough, ask questions and I'll be happy to try and explain better...

Last edited by dpierron; 03-09-2010 at 11:49 AM. Reason: Added calibredbxtract
dpierron is offline   Reply With Quote
Old 11-16-2009, 03:20 PM   #2
kjk
.
kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.kjk ought to be getting tired of karma fortunes by now.
 
Posts: 3,408
Karma: 5647231
Join Date: Oct 2008
Device: never enough
So...you are accessing your entire Calibre library on Stanza iPhone from anywhere? Over 3G? That...is pretty awesome.
kjk is offline   Reply With Quote
Old 11-16-2009, 04:02 PM   #3
dpierron
calibre2opds guru
dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.
 
dpierron's Avatar
 
Posts: 532
Karma: 8792
Join Date: Aug 2005
Location: Metz, France
Device: iPhone, iPad, PRS-650
Over Wifi, 3G, even over Edge : the file sizes are usually small enough to make it possible even with a very low bandwidth.
dpierron is offline   Reply With Quote
Old 11-16-2009, 04:36 PM   #4
Gideon
Wearer of Pants
Gideon knows the square root of minus one.Gideon knows the square root of minus one.Gideon knows the square root of minus one.Gideon knows the square root of minus one.Gideon knows the square root of minus one.Gideon knows the square root of minus one.Gideon knows the square root of minus one.Gideon knows the square root of minus one.Gideon knows the square root of minus one.Gideon knows the square root of minus one.Gideon knows the square root of minus one.
 
Gideon's Avatar
 
Posts: 1,050
Karma: 7634
Join Date: Jan 2008
Location: Norman, OK
Device: Amazon Kindle DX / iPhone
That's bloody brilliant
Gideon is offline   Reply With Quote
Old 11-17-2009, 04:38 AM   #5
dpierron
calibre2opds guru
dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.
 
dpierron's Avatar
 
Posts: 532
Karma: 8792
Join Date: Aug 2005
Location: Metz, France
Device: iPhone, iPad, PRS-650
Thanks for the bloody compliment

Unfortunately, Kovid seems to disagree with my opinion that it would be better if Calibre itself triggered the generation of the stanza.xml catalog ; his point of view is that it would be easy to do with a cron job, and I'm trying to demonstrate that not everyone (nor every operating system) is capable of managing cron jobs... But I'm afraid it's a lost cause
Anyhow, even if it has to be done manually, it's still great and it's still thanks to Kovid and his amazing work that we're able to do it !
dpierron is offline   Reply With Quote
Old 11-17-2009, 06:07 AM   #6
dpierron
calibre2opds guru
dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.
 
dpierron's Avatar
 
Posts: 532
Karma: 8792
Join Date: Aug 2005
Location: Metz, France
Device: iPhone, iPad, PRS-650
And guess what is already corrected in today's Calibre release (0.6.24) ?

calibredb list: Do not URL encode the href fields for the stanza output format

Thanks Kovid, that's one small step for you, and a giant's leap for us, Dropbox users
dpierron is offline   Reply With Quote
Old 11-18-2009, 09:54 AM   #7
rcuadro
Wizard
rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.
 
rcuadro's Avatar
 
Posts: 1,688
Karma: 874275
Join Date: Nov 2008
Location: Virginia Beach, VA
Device: Kindle DX
I finally got it working This is awesome! It gives me almost the same relationship between my iPhone and Stanza as I have with my Kindle and Amazon
rcuadro is offline   Reply With Quote
Old 11-18-2009, 10:24 AM   #8
dpierron
calibre2opds guru
dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.
 
dpierron's Avatar
 
Posts: 532
Karma: 8792
Join Date: Aug 2005
Location: Metz, France
Device: iPhone, iPad, PRS-650
Yes, I agree ! I'm having the same feeling.

Let's not upgrade the calibredb tool to version 0.6.24, because the change Kovid made for Stanza catalog export is causing a problem : the spaces are not converted into %20 characters, and therefore the stanza.xml file is not readable by Stanza.

Better keep 0.6.23 until it is fixed, even if this means that we must manually convert '%28' and '%29' into '(' and ')' characters ...
dpierron is offline   Reply With Quote
Old 11-18-2009, 10:46 AM   #9
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,046
Karma: 777825
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
Imust admit I did not understand why Kovid made that change. If a URL is not correctly escaped it does not get handled correctly by Stanza. I guess there must have been a reason otherwise he would not have done it?

Has a ticket been raised to point out this is causing problems?
itimpi is online now   Reply With Quote
Old 11-18-2009, 10:59 AM   #10
dpierron
calibre2opds guru
dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.
 
dpierron's Avatar
 
Posts: 532
Karma: 8792
Join Date: Aug 2005
Location: Metz, France
Device: iPhone, iPad, PRS-650
In fact it's all my fault : I asked Kovid (in this ticket) to change the behavior of calibredb so that we would not have to manually convert %28 into '(' and %29 into ')'

And then the change he made disabled urlencoding of the links in the stanza.xml file, which is overkill (but I should have said it beforehand).

He couldn't test it, because he would need an iPhone with Stanza...
dpierron is offline   Reply With Quote
Old 11-18-2009, 11:01 AM   #11
rcuadro
Wizard
rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.
 
rcuadro's Avatar
 
Posts: 1,688
Karma: 874275
Join Date: Nov 2008
Location: Virginia Beach, VA
Device: Kindle DX
I have been using .6.24 since it was released and it works well enough for me for the time being... especially since I am in the middle of a book on my Kindle
The best thing is that: 1) I now have the ability to have remote access to all my non Amazon books. 2) I have a central location for my eBooks

It would have been even better if I could have been able to access Dropbox from my Kindle the same way as Stanza on the iPhone.
rcuadro is offline   Reply With Quote
Old 11-18-2009, 11:06 AM   #12
rcuadro
Wizard
rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.rcuadro ought to be getting tired of karma fortunes by now.
 
rcuadro's Avatar
 
Posts: 1,688
Karma: 874275
Join Date: Nov 2008
Location: Virginia Beach, VA
Device: Kindle DX
You know... you are right...if there was a way to get Calibre to automatically generate the stanza.xml automatically when changes are made it would be awesome
rcuadro is offline   Reply With Quote
Old 11-18-2009, 11:14 AM   #13
dpierron
calibre2opds guru
dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.
 
dpierron's Avatar
 
Posts: 532
Karma: 8792
Join Date: Aug 2005
Location: Metz, France
Device: iPhone, iPad, PRS-650
Quote:
Originally Posted by rcuadro View Post
I have been using .6.24 since it was released and it works well enough for me for the time being...
Maybe it's because none of your file paths contain spaces ?
dpierron is offline   Reply With Quote
Old 11-18-2009, 12:18 PM   #14
tlrowley
Quilt Geek
tlrowley is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.tlrowley is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.tlrowley is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.tlrowley is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.tlrowley is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.tlrowley is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.tlrowley is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.tlrowley is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.tlrowley is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.tlrowley is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.tlrowley is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Posts: 470
Karma: 91775
Join Date: Aug 2007
Location: Tracy, CA
Device: Kindle
Quote:
Originally Posted by rcuadro View Post
It would have been even better if I could have been able to access Dropbox from my Kindle the same way as Stanza on the iPhone.
Forgive me you already know this, but the newer versions of the Calibre server detect the mobile browser of the Kindle. I'm able to download all my non-Amazon books (I also store the Amazon ones, too), directly to my Kindle. Searching/sorting all works - it's fabulous!!

It's not Dropbox, since you have to keep your own computer running, but it works great. I do use Dropbox, too - I keep my library on my laptop synced (via Dropbox) to the iMac that we use as our server.
tlrowley is offline   Reply With Quote
Old 11-18-2009, 12:47 PM   #15
mores
Guru
mores knows the air-speed velocity of an unladen swallow.mores knows the air-speed velocity of an unladen swallow.mores knows the air-speed velocity of an unladen swallow.mores knows the air-speed velocity of an unladen swallow.mores knows the air-speed velocity of an unladen swallow.mores knows the air-speed velocity of an unladen swallow.mores knows the air-speed velocity of an unladen swallow.mores knows the air-speed velocity of an unladen swallow.mores knows the air-speed velocity of an unladen swallow.mores knows the air-speed velocity of an unladen swallow.mores knows the air-speed velocity of an unladen swallow.
 
mores's Avatar
 
Posts: 833
Karma: 102419
Join Date: Sep 2007
Location: Vienna, Austria
Device: iPhone
What are "cron jobs"?





Hope that helps your cause!
mores is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use Dropbox with Calibre BAD18 Related Tools 5 11-09-2011 08:52 AM
Apple Tries To Acquire Dropbox for $800 Million, Dropbox Refuses jocampo News 166 09-17-2011 02:06 PM
Calibre and Dropbox question jhempel24 Related Tools 3 05-19-2011 06:41 AM
Using dropbox and Calibre totaltech Related Tools 7 04-29-2011 02:28 PM
calibre and dropbox error modkindle Calibre 6 04-26-2010 10:57 PM


All times are GMT -4. The time now is 04:13 AM.


MobileRead.com is a privately owned, operated and funded community.