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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 08-09-2010, 05:43 AM   #1
plord
Junior Member
plord began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2010
Device: kindle
Commandline only build

I'm thinking about running calibre on my little server (a DNS-323 which runs linux). I've other python programs running okay.

I don't need the GUI, of course, just the server part running so that feeds are downloaded overnight and emailed to my kindle.

Is this possible ?

I tried building calibre on the DNS-323 but I see :-

$ python setup.py
Traceback (most recent call last):
File "setup.py", line 13, in <module>
import setup.commands as commands
File "/mnt/HD_a2/home/plord/src/calibre/calibre/setup/commands.py", line 28, in <module>
from setup.translations import POT, GetTranslations, Translations, ISO639
File "/mnt/HD_a2/home/plord/src/calibre/calibre/setup/translations.py", line 14, in <module>
from setup.build_environment import pyqt
File "/mnt/HD_a2/home/plord/src/calibre/calibre/setup/build_environment.py", line 12, in <module>
from PyQt4 import pyqtconfig
ImportError: No module named PyQt4


which is true ... there isn't any QT installed.

Is it possible to have a server-only version of calibre ?

Many thanks,

Pete
plord is offline   Reply With Quote
Old 08-09-2010, 06:06 AM   #2
kacir
Wizard
kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.
 
kacir's Avatar
 
Posts: 3,447
Karma: 10484861
Join Date: May 2006
Device: PocketBook 360, before it was Sony Reader, cassiopeia A-20
Quote:
Originally Posted by plord View Post
I tried building calibre on the DNS-323 but I see :-

$ python setup.py
...
ImportError: No module named PyQt4


which is true ... there isn't any QT installed.

Is it possible to have a server-only version of calibre ?
There was similar discussion before.
If I recall correctly, you do need QT libraries even to build a commandline-only version. QT provides much more than GUI components.
kacir is offline   Reply With Quote
Advert
Old 08-09-2010, 12:03 PM   #3
kingduct
Enthusiast
kingduct doesn't litterkingduct doesn't litterkingduct doesn't litter
 
Posts: 45
Karma: 220
Join Date: Jul 2010
Device: none
The previous discussion essentially said that you have to do a full install, but can run a lot of the stuff from the command line. In other words, if you have plenty of disk space and you don't mind installing a bunch of dependencies, it'll be pretty useful.

However, if you don't have lots of disk space, or don't want lots of extra stuff on a server that has other important jobs, it won't be so great.
kingduct is offline   Reply With Quote
Old 08-09-2010, 01:35 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,779
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
plenty of diskspace? A calibre install is about 100MB. And the binary install of calibre is completely self contained so you dont need *any* dependencies, except a reasonably recent glibc.
kovidgoyal is offline   Reply With Quote
Old 08-09-2010, 01:43 PM   #5
kingduct
Enthusiast
kingduct doesn't litterkingduct doesn't litterkingduct doesn't litter
 
Posts: 45
Karma: 220
Join Date: Jul 2010
Device: none
Fair enough, but according to the calibre binary download page, you do need xdg-utils installed, which means a complete installation of x.org (which when I quickly checked for my ubuntu server would mean about 50 additional mb).

I guess you are right that these days a total 150 mb is not much...
kingduct is offline   Reply With Quote
Advert
Old 08-09-2010, 01:50 PM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,779
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
xdg-utils are a bunch of shell scripts, you don't need x.org installed for them. And anyway if you dont have xdg-utils installed, the calibre installer will simply not install desktop integration. The rest of the install will work fine.
kovidgoyal is offline   Reply With Quote
Old 08-09-2010, 01:54 PM   #7
kingduct
Enthusiast
kingduct doesn't litterkingduct doesn't litterkingduct doesn't litter
 
Posts: 45
Karma: 220
Join Date: Jul 2010
Device: none
Thanks for the quick update. I'll definitely be giving this a try!
kingduct is offline   Reply With Quote
Old 10-14-2010, 07:53 AM   #8
plord
Junior Member
plord began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2010
Device: kindle
To followup on my initial post, I've now managed to build calibre on my DNS-323. Its then a simple case to write cron scripts (which uses ebook-convert, calibre-smtp and calibredb ) to create periodicals overnight and send them to my kindle via wispernet. Nice :-)

If anyone is interested my (fun-plug based) builds are available here http://www.plord.co.uk/funplug/0.5/

See also http://wiki.dns323.info/

Pete
plord is offline   Reply With Quote
Old 10-14-2010, 12:19 PM   #9
nchall114
Enthusiast
nchall114 began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Apr 2010
Device: Kindle Paperwhite, Kindle for Android
awesome. could you post a sample script? i am trying to do the same thing using a windows batch file to download, add to db and email to my kindle.
nchall114 is offline   Reply With Quote
Old 10-14-2010, 01:59 PM   #10
plord
Junior Member
plord began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2010
Device: kindle
Nothing fancy at the moment :-

Code:
#!/ffp/bin/sh

set -e

PATH=/ffp/bin:$PATH
export PATH
TMPDIR=/ffp/tmp
export TMPDIR
RECIPIEHOME=/ffp/share/calibre/recipes
DESTDIR=/mnt/HD_a2/Media/Books/Periodicals
FROM=xxxx@x.com
TO=yyyy@free.kindle.com

# what to fetch on each day
#
daily="dilbert"
Monday="teleread"
Tuesday="new_scientist"
Wednesday=""
Thursday="lwn"
Friday="linux_magazine"
Saturday="guardian"
Sunday="wired_uk"

today=$(date +%A)
for feed in ${daily} $(eval echo \${$(date +%A)})
do
        extras=""
        if [ "$feed" == "lwn" ]
        then
                extras="--username=user --password=pass"
        fi
        rm -f ${DESTDIR}/${feed}.mobi
        ebook-convert ${RECIPIEHOME}/${feed}.recipe ${DESTDIR}/${feed}.mobi --output-profile kindle ${extras}
        calibre-smtp --attachment=${DESTDIR}/${feed}.mobi ${FROM} ${TO} ""
        calibredb add ${DESTDIR}/${feed}.mobi -d --library-path ~/calibre
done
plord is offline   Reply With Quote
Old 11-23-2010, 12:34 PM   #11
beachsun
Junior Member
beachsun began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Nov 2010
Device: Kindle 3 Wifi
Calibre : Cannot use .so modules from python

Hi plord,
i'm trying to use your fun-plug Calibre packages on my dns-323, but i'm having an error when calling ebook-convert on file ebooks/epub/input.py on the line
"from lxml import etree".

I have installed the lxml package from your repository, in fact i've installed every package is declared requisite on Calibre Download Linux page that exist on your repository, but it's like python cannot load etree.so from the path where is it.

any hint?
have i missed any path on any enviroment variable?

Best Regards.
beachsun is offline   Reply With Quote
Old 11-27-2010, 06:56 PM   #12
beachsun
Junior Member
beachsun began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Nov 2010
Device: Kindle 3 Wifi
Hi, i finally found the problem.
I was missing the libxslt Library, that is a requeriment of lxml.

But now when i call ebook-convert with a recipe, ie dilbert, it ends with a Segmentation Fault.

Any one can help?

Best Regards

Edit : So finally Segmentation Fault was a missing Libjpeg Library.

Next Step :
Now the message error is :
ImportError: cannot import name QPrinter

the python(on ebooks/pdf/pageoptions.py) line says : from PyQt4.Qt import QPrinter

Just like the PyQt4 port doesn't have QPrinter.

To see which modules has PyQt4 i have executed :
import PyQt4.Qt; print dir(PyQt4.Qt);

And the result is :
['PYQT_VERSION', 'PYQT_VERSION_STR', 'QAbstractAnimation', 'QAbstractEventDispatcher', 'QAbstract FileEngine', 'QAbstractFileEngineHandler', 'QAbstractFileEngineIterator', 'QAbstractItemModel', ' QAbstractListModel', 'QAbstractState', 'QAbstractTableModel', 'QAbstractTransition', 'QAnimationG roup', 'QBasicTimer', 'QBitArray', 'QBuffer', 'QByteArray', 'QByteArrayMatcher', 'QChar', 'QChild Event', 'QCoreApplication', 'QCryptographicHash', 'QDataStream', 'QDate', 'QDateTime', 'QDir', 'Q DirIterator', 'QDynamicPropertyChangeEvent', 'QEasingCurve', 'QEvent', 'QEventLoop', 'QEventTrans ition', 'QFSFileEngine', 'QFile', 'QFileInfo', 'QFileSystemWatcher', 'QFinalState', 'QGenericArgu ment', 'QGenericReturnArgument', 'QHistoryState', 'QIODevice', 'QLatin1Char', 'QLatin1String', 'Q Library', 'QLibraryInfo', 'QLine', 'QLineF', 'QLocale', 'QMargins', 'QMetaClassInfo', 'QMetaEnum' , 'QMetaMethod', 'QMetaObject', 'QMetaProperty', 'QMetaType', 'QMimeData', 'QModelIndex', 'QMutex ', 'QMutexLocker', 'QObject', 'QObjectCleanupHandler', 'QParallelAnimationGroup', 'QPauseAnimatio n', 'QPersistentModelIndex', 'QPluginLoader', 'QPoint', 'QPointF', 'QProcess', 'QProcessEnvironme nt', 'QPropertyAnimation', 'QReadLocker', 'QReadWriteLock', 'QRect', 'QRectF', 'QRegExp', 'QResou rce', 'QRunnable', 'QSemaphore', 'QSequentialAnimationGroup', 'QSettings', 'QSharedMemory', 'QSig nalMapper', 'QSignalTransition', 'QSize', 'QSizeF', 'QSocketNotifier', 'QState', 'QStateMachine', 'QString', 'QStringList', 'QStringMatcher', 'QStringRef', 'QSysInfo', 'QSystemLocale', 'QSystemS emaphore', 'QT_TRANSLATE_NOOP', 'QT_TR_NOOP', 'QT_TR_NOOP_UTF8', 'QT_VERSION', 'QT_VERSION_STR', 'QTemporaryFile', 'QTextBoundaryFinder', 'QTextCodec', 'QTextDecoder', 'QTextEncoder', 'QTextStre am', 'QTextStreamManipulator', 'QThread', 'QThreadPool', 'QTime', 'QTimeLine', 'QTimer', 'QTimerE vent', 'QTranslator', 'QUrl', 'QUuid', 'QVariant', 'QVariantAnimation', 'QWaitCondition', 'QWrite Locker', 'QXmlStreamAttribute', 'QXmlStreamAttributes', 'QXmlStreamEntityDeclaration', 'QXmlStrea mEntityResolver', 'QXmlStreamNamespaceDeclaration', 'QXmlStreamNotationDeclaration', 'QXmlStreamR eader', 'QXmlStreamWriter', 'Q_ARG', 'Q_ENUMS', 'Q_FLAGS', 'Q_RETURN_ARG', 'Qt', 'QtCriticalMsg', 'QtDebugMsg', 'QtFatalMsg', 'QtMsgType', 'QtSystemMsg', 'QtWarningMsg', 'SIGNAL', 'SLOT', '__doc __', '__file__', '__license__', '__name__', '__package__', 'bin', 'bom', 'center', 'dec', 'endl', 'fixed', 'flush', 'forcepoint', 'forcesign', 'hex', 'left', 'lowercasebase', 'lowercasedigits', 'noforcepoint', 'noforcesign', 'noshowbase', 'oct', 'pyqtProperty', 'pyqtRemoveInputHook', 'pyqtR estoreInputHook', 'pyqtSignal', 'pyqtSignature', 'pyqtSlot', 'pyqtWrapperType', 'qAbs', 'qAddPost Routine', 'qChecksum', 'qCompress', 'qCritical', 'qDebug', 'qErrnoWarning', 'qFatal', 'qFuzzyComp are', 'qInf', 'qInstallMsgHandler', 'qIsFinite', 'qIsInf', 'qIsNaN', 'qIsNull', 'qQNaN', 'qRegist erResourceData', 'qRemovePostRoutine', 'qRound', 'qRound64', 'qSNaN', 'qSetFieldWidth', 'qSetPadC har', 'qSetRealNumberPrecision', 'qSharedBuild', 'qSwap', 'qUncompress', 'qUnregisterResourceData ', 'qVersion', 'qWarning', 'qrand', 'qsrand', 'reset', 'right', 'scientific', 'showbase', 'upperc asebase', 'uppercasedigits', 'ws']


There is no QPrinter, neither QPainter, QPixmap (used on ebooks/pdf/writer.py).


As usual i'm ready to listen hints or any helpful tip.

Thanks in advance...


Edit 2: Ok so more Missing Libs, this time Linpng, freetype and fontconfig.

So to avoid someone having the same problems as me here are the required Lib for Calibre port form DNS 323 :

beautifulsoup-3.0.8.1-1.tgz
chmlib-0.40-1.tgz
cssutils-0.9.7b3-1.tgz
dnspython-1.8.0-1.tgz
fontconfig-2.8.0-1.tgz
freetype-2.4.2-1.tgz
imagemagick-6.6.4-9-1.tgz
libjpeg-6b-1.tgz
libpng-1.2.29-1.tgz
libwmf-0.2.8.4-1.tgz
libX11-1.3.2-1.tgz
libXau-1.0.5-1.tgz
libXext-1.1.1-1.tgz
libxslt-1.1.26-1.tgz
lxml-2.2.8-1.tgz
mechanize-0.2.2-1.tgz
pil-1.1.7-1.tgz
podofo-0.8.2-1.tgz
poppler-0.14.3-1.tgz
PyQT-4.7.7-1.tgz
python-2.6.4-1.tgz
python-dateutil-1.5-1.tgz
qt-4.6.3-1.tgz
sip-4.11.1-1.tgz

ebook-convert seems to work.
Now let's try calibre-smtp...

stay tuned!!

Last edited by beachsun; 11-28-2010 at 04:25 PM. Reason: Next Step....
beachsun 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
Mac Build pdurrant Sigil 1 08-10-2009 11:31 AM
0.6.0b1 build help WayneD Calibre 5 06-01-2009 08:00 PM
Build Problem ali_sade OpenInkpot 1 04-15-2009 04:46 AM
webcomic2lrf, a brutal and simplistic commandline script acidzebra Sony Reader Dev Corner 8 12-23-2008 03:17 PM
Does someone still have Mobigen 6.01 build 37? IceHand Kindle Formats 7 03-03-2008 05:04 PM


All times are GMT -4. The time now is 06:12 PM.


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