Welcome! Log In Create A New Profile

Advanced

Calibre

Posted by frozenrhino 
Calibre
December 30, 2010 01:52PM
Hey there.

Have any of you had luck getting Calibre (an ebook manager) working on your dockpogosheevaNAS yet?

I'm hoping the author of the software can point out a server/db only setup.

I don't have much in the way of music and movies, but I have thousands of ebooks on pdf and mobi that I'd like to get to through Calibre rather than just dumping them in a directory and hitting them through a webpage.

Good hunting,

FZR
Re: Calibre
December 30, 2010 03:58PM
Thought I'd give a progress update.

So according to the dev/docs, Calibre can be run as a server-only app.

There is an apt-get package so I installed that, copied my library over, and started using:

calibre-server --with-library /mountpointhere and got these errors:
sudo /usr/bin/calibre-server --with-library /mnt/thumb/calibre_library/
Traceback (most recent call last):
  File "/usr/bin/calibre-server", line 18, in <module>
    from calibre.library.server.main import main
  File "/usr/lib/calibre/calibre/library/server/main.py", line 12, in <module>
    from calibre.library.server.base import LibraryServer
  File "/usr/lib/calibre/calibre/library/server/base.py", line 23, in <module>
    from calibre.library.server.opds import OPDSServer
  File "/usr/lib/calibre/calibre/library/server/opds.py", line 15, in <module>
    import routes
ImportError: No module named routes

Waiting to hear back from the dev/users on the MobileRead forum about this, I'll ping back when I do.
I think Calibre is the exact kind of thing that a PogoDockSheevaNAS would be great for, so I'm looking forward to getting this going.

All the best,

FZR
Re: Calibre
December 30, 2010 07:23PM
Hi frozenrhino

Assuming you're running Debian on your dockpogosheevaNAS, you might find the following useful:-

Debian bug #590561

I haven't tried to install Calibre on my pogoplug, but I think you're just missing the package python-routes

Maybe try installing it with:

apt-get install python-routes

Hope this helps

Chris
Re: Calibre
January 03, 2011 09:17AM
Update:

According to the dev there is no binary package for Debian ARM yet.
In addition, while there is an apt-get package, it doesn't have the server working which doesn't do me much good.

There are a number of dependencies that need to be installed, and I have not as yet had the time to get that going.

Once I do, I'll let you know.

In addition, because of a quirk/bug in SqlLite, you can't just mount your calibre library on the NAS and access it from a Mac/Win box. You have to create a symlink to the mounted directory.

FZR
Re: Calibre
January 17, 2011 10:36PM
If you ever get Calibre working as a server on the Dockstar, I would be interested in following in your footsteps.
Re: Calibre
January 21, 2011 11:08AM
If I get it going, I'll definitely post the steps.

The problem as it stands is this: Calibre calls for a lot of dependencies, some of which I can't seem to find at all.


Package	Version
python	2.6
Python Imaging Library	1.1.6
Qt	4.6.0
PyQt	4.7.0
python-mechanize	0.1.11
ImageMagick	6.5.9
xdg-utils	1.0.2
lxml	2.2.1
python-dateutil	1.4.1
cssutils	0.9.7a3
BeautifulSoup	3.0.5
dnspython	1.6.0
poppler	0.12.0
podofo	0.8.2
libwmf	0.2.8
chmlib	0.40
ICU	4.4

I'm thinking our best bet would be to roll the ball up the hill, create our own .deb or apt package (not sure how, but that'll be a learning experience I guess) and make it available for other pogodocksheevaplug users.
lulu
Re: Calibre
March 03, 2011 07:10AM
Hi,

got calibre-server (and the other commandline tools) running on a GoFlexNet with debian squeeze.
Be warned: you have to install a lot of dependencies - takes a couple of hours to install / compile all of it on a dockstar!

First install the following packages:

apt-get install bzip2 build-essetial linux-headers-2.6-kirkwood
apt-get install libc6 libchm1 libfontconfig1 libgcc1 libicu44 libmagickcore3 libmagickwand3 libpng12-0 libpoppler5 libpython2.6
apt-get install libqtcore4 libqtgui4 libstdc++6 python imagemagick python-beautifulsoup python-cherrypy3 python-cssutils 
apt-get install python-dateutil python-dbus python-django-tagging python-encutils python-imaging python-lxml python-mechanize
apt-get install python-pkg-resources python-pyparsing python-pypdf python-pythonmagick python-qt4 python-routes ttf-liberation xdg-utils
apt-get install cdbs debhelper dh-buildinfo libchm-dev libmagickwand-dev libpoppler-qt4-dev libqt4-dev pyqt4-dev-tools
apt-get install python-qt4-dev python-setuptools python2.6-dev sip4 txt2man libicu-dev libsqlite3-dev

Calibre needs a newer version of SIP than the one in the repros, so:
cd /opt
wget http://www.riverbankcomputing.co.uk/static/Downloads/sip4/sip-4.12.1.tar.gz
tar xvzf sip-4.12.1.tar.gz
cd sip-4.12.1
python configure.py
make
make install
cd /opt
wget http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-x11-gpl-4.8.3.tar.gz
tar xvzf PyQt-x11-gpl-4.8.3.tar.gz
cd PyQt-x11-gpl-4.8.3
python configure.py
make
make install

.. and at last:
cd /opt
wget -O- http://status.calibre-ebook.com/dist/src | tar xvz 
cd calibre*
python setup.py install

Hope that helps.
Re: Calibre
March 09, 2011 09:21PM
Well, its further than I've gotten.

Here's the latest error in the build.
####### Building extension pictureflow #######

####### Building extension progress_indicator #######

*
* Running gui
*

Traceback (most recent call last):
  File "setup.py", line 99, in <module>
    sys.exit(main())
  File "setup.py", line 85, in main
    command.run_all(opts)
  File "/opt/calibre/setup/__init__.py", line 159, in run_all
    self.run_cmd(self, opts)
  File "/opt/calibre/setup/__init__.py", line 152, in run_cmd
    self.run_cmd(scmd, opts)
  File "/opt/calibre/setup/__init__.py", line 155, in run_cmd
    cmd.run(opts)
  File "/opt/calibre/setup/gui.py", line 36, in run
    self.build_forms()
  File "/opt/calibre/setup/gui.py", line 59, in build_forms
    from calibre.gui2 import build_forms
  File "/opt/calibre/src/calibre/gui2/__init__.py", line 8, in <module>
    from PyQt4.Qt import QVariant, QFileInfo, QObject, SIGNAL, QBuffer, Qt, \
ImportError: cannot import name QVariant

Did you see this in your build?
lulu
Re: Calibre
March 15, 2011 10:00AM
Yes, I had this also.
Happens when the version of SIP and PyQT4 do not match.
Download, compile and install both SIP and PyQT4 as shown in my previous post.
For me this solved the problem.
Re: Calibre
March 19, 2011 11:09PM
Tried it again using the instructions above (as both sudo and as root) and got a segfault when trying to run the server.

I did see this on calibre's site which is new since the last time I looked:

Make sure your system has python ≥ 2.7.1 not 3.x

I just did an apt-get update and it updated to 2.6.6 so that may be the problem right there. Ill dig around through the apt documentation and find how to get an install python ≥ 2.7.1 and < 3.0.
Re: Calibre
March 19, 2011 11:18PM
Well, at least I'm getting new errors. That has to be progress, right? =D

Traceback (most recent call last):
  File "/usr/bin/calibre-server", line 19, in <module>
    sys.exit(main())
  File "/usr/lib/calibre/calibre/library/server/main.py", line 114, in main
    db = LibraryDatabase2(opts.with_library)
  File "/usr/lib/calibre/calibre/library/database2.py", line 160, in __init__
    if not os.path.exists(library_path):
  File "/usr/lib/python2.6/genericpath.py", line 18, in exists
    st = os.stat(path)
TypeError: coercing to Unicode: need string or buffer, NoneType found
Re: Calibre
March 19, 2011 11:19PM
Also, the previous errors I got during the build. The latest errors I get when running calibre-server from the CLI.
lulu
Re: Calibre
March 22, 2011 03:56AM
Congratulation!
You've got Calibre working as expected ;-)

The problem is that you have not specified any library for calibre-server.
When starting calibres GUI it will create a new library if none exists. Calibre-server does not.
Use an existing calibre library (or create a new one with calibre GUI from PC) and tell calibre-server to use this library:
calibre-server --with-library="<path-to-your-library>"

That should do it.
Re: Calibre
March 22, 2011 08:41AM
Wow. Either I'm a dolt or I was so tired I didn't read the error messages because you're spot on. I just needed to feed it a library. =D

It's giving me "upgrading database to version X" where X is {17-20} so far.

As much time as the compiles took, I'm guessing this will take some time as well so I'll let it grind and hope for the best.

It doesn't show calibre-server yet in ps -a so I'm guessing this thing shows in the process list as python?
Re: Calibre
March 22, 2011 02:04PM
Holy buckets, it works.

A couple notes for anyone doing this in the future:

* Read the above, esp the part about pointing calibre-server towards a directory.
* On my setup (pogoplug, debian squeeze, wd 1tb mybook), all steps had to be done as root. Doing them as sudo just threw error messages.

Huge thanks to Lulu for the help. When I got the pogoplug in my hands last December, this is exactly what I'd envisioned.
lulu
Re: Calibre
March 23, 2011 02:59AM
Glad I could help.

By the way: are you satisfied with the speed of calibre on deskstar?
I tried it with a library of around 10.000 ebooks both on local sata disk (GoFlex Net, UBIT kernel 2.6.37) and over NFS.
Both versions are much to slow to be of real use...
Re: Calibre
March 23, 2011 06:50PM
Im happy with so far. I run a library of about 7800 books all on a Cruiser 16g thumbdrive and while it could be faster, I'm pretty tickled.
yanman
Re: Calibre
May 15, 2011 12:25AM
Hi!

Thanks for the posts, this is exactly what i'm trying to setup on a SheevaPlug...

I am a (not totally but still) newb... mostly on the Python part.

After installing the packages as described by lulu, I was still missing "importlib" which I installed from:
http://pypi.python.org/pypi/importlib/1.0.2

Don't know if this is relevant but since your post, SIP is now sip-4.12.2 and PyQt-x11-gpl is 4.8.4.

When trying to launch the compil i get:

SheevaPlug:/opt/calibre# python setup.py install
Traceback (most recent call last):
  File "setup.py", line 99, in <module>
    sys.exit(main())
  File "setup.py", line 85, in main
    command.run_all(opts)
  File "/opt/calibre/setup/__init__.py", line 161, in run_all
    self.run_cmd(self, opts)
  File "/opt/calibre/setup/__init__.py", line 152, in run_cmd
    cmd.pre_sub_commands(opts)
  File "/opt/calibre/setup/install.py", line 128, in pre_sub_commands
    import calibre.utils.config as c
  File "/opt/calibre/src/calibre/__init__.py", line 19, in <module>
    from calibre.startup import winutil, winutilerror
  File "/opt/calibre/src/calibre/startup.py", line 60, in <module>
    set_translators()
  File "/opt/calibre/src/calibre/utils/localization.py", line 68, in set_translators
    lang = get_lang()
  File "/opt/calibre/src/calibre/utils/localization.py", line 27, in get_lang
    from calibre.utils.config_base import prefs
  File "/opt/calibre/src/calibre/utils/config_base.py", line 430, in <module>
    prefs['installation_uuid'] = str(uuid.uuid4())
  File "/opt/calibre/src/calibre/utils/config_base.py", line 353, in __setitem__
    return self.set(key, val)
  File "/opt/calibre/src/calibre/utils/config_base.py", line 364, in set
    return self.__config.set(key, val)
  File "/opt/calibre/src/calibre/utils/config_base.py", line 304, in set
    src = self.option_set.serialize(opts)+ '\n\n' + footer + '\n'
  File "/opt/calibre/src/calibre/utils/config_base.py", line 235, in serialize
    for name in [None] + self.group_list]
  File "/opt/calibre/src/calibre/utils/config_base.py", line 218, in render_group
    self.serialize_opt(getattr(opts, pref.name, pref.default))))
  File "/opt/calibre/src/calibre/utils/config_base.py", line 226, in serialize_opt
    from PyQt4.QtCore import QString
RuntimeError: the sip module implements API v8.0 to v8.1 but the PyQt4.QtCore module requires API v7.1


@frozenrhino: Did you manage/had to install python ≥ 2.7.1 and < 3.0 ?

Thanks in advance for any help you can give!
Yan
Re: Calibre
June 09, 2011 10:10PM
Hey Yan,

Im running python 2.6.6 and dont seem to be having any troubles at all with it.
Re: Calibre
June 09, 2011 10:12PM
Just an update on this topic. Im sure everyone else knows this already, but in case anyone is doing this the hard way --

Calibre (the GUI version, not just calibre-server) runs (albeit very, very slowly) on a pogoplug through VNC.

It's not something I'd recommend to anyone unless you really like pain.

When Calibre is actually doing anything, the memory use spikes on my pogoplug, according to Top.

Calibre-server on the other hand, peachy. Absolutely peachy. Couldn't ask for better.

Now if the guy would just make the server more secure, allow multiple logins, stop dogging on Debian all the time, make a binary for ARM, etc. =D
Re: Calibre
July 21, 2011 05:20PM
Just wanted to mention that with the latest repository I managed to get Calibre to install with a simple:

apt-get install calibre
apt-get install python-routes

The latter was the only thing missing.
tikismoke
Re: Calibre
August 07, 2011 08:54AM
Thank's it works on a debian.
gym
Re: Calibre
February 24, 2012 09:23AM
frozenrhino Wrote:
-------------------------------------------------------
> Thought I'd give a progress update.
>
> So according to the dev/docs,
> [url=http://calibre-ebook.com/user_manual/faq.html
> #id51]Calibre can be run as a server-only
> app[/url].
>
> There is an apt-get package so I installed that,
> copied my library over, and started using:
>
> calibre-server --with-library /mountpointhere and
> got these errors:
> [code]
> sudo /usr/bin/calibre-server --with-library
> /mnt/thumb/calibre_library/
> Traceback (most recent call last):
> File "/usr/bin/calibre-server", line 18, in
> <module>
> from calibre.library.server.main import main
> File
> "/usr/lib/calibre/calibre/library/server/main.py",
> line 12, in <module>
> from calibre.library.server.base import
> LibraryServer
> File
> "/usr/lib/calibre/calibre/library/server/base.py",
> line 23, in <module>
> from calibre.library.server.opds import
> OPDSServer
> File
> "/usr/lib/calibre/calibre/library/server/opds.py",
> line 15, in <module>
> import routes
> ImportError: No module named routes
> [/code]
>
> Waiting to hear back from the dev/users on the
> MobileRead forum about this, I'll ping back when I
> do.
> I think Calibre is the exact kind of thing that a
> PogoDockSheevaNAS would be great for, so I'm
> looking forward to getting this going.
>
> All the best,
>
> FZR
Re: Calibre
October 06, 2014 02:02AM
Quote
frozenrhino
> Calibre (the GUI version, not just calibre-server)
> runs (albeit very, very slowly) on a pogoplug
> through VNC.
>
> It's not something I'd recommend to anyone unless
> you really like pain.
>
> When Calibre is actually doing anything, the
> memory use spikes on my pogoplug, according to
> Top.
>
> Calibre-server on the other hand, peachy.
> Absolutely peachy. Couldn't ask for better.
>
> Now if the guy would just make the server more
> secure, allow multiple logins, stop dogging on
> Debian all the time, make a binary for ARM, etc.
> =D

It's an old topic! but I'm looking for info how to run Calibre in our headless plugs :) as a book junkie, I'd love to be able to sync all my ebooks to mobile devices. Ideally I'd like to run it as a repository server, to sync all the books to iPad and Nexus 7. But the calibre-server package is no longer available.

Calibre current version on Debian wheezy:
ii  calibre                                    0.8.51+dfsg1-0.1              all          e-book converter and library management
ii  calibre-bin                                0.8.51+dfsg1-0.1              armel        e-book converter and library management
in Debian jessie
Package: calibre (2.4.0+dfsg-1) in jessie
The man page is very lacking in details! Anybody have info about how to run Calibre server, I'd appreciate a hint.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 10/06/2014 03:15AM by bodhi.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: