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

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 03-01-2011, 02:07 PM   #1
Coleccionista
Connoisseur
Coleccionista began at the beginning.
 
Posts: 57
Karma: 40
Join Date: Aug 2010
Device: iPad, Kindle 3 Wi-Fi
Development documentation question (basic)

I've been trying to follow the instructions at:

http://calibre-ebook.com/user_manual/develop.html

But I cannot get the "Hello world!" sample to print out after running calibredb.
It just shows calibredb help message.

I've tried both in Linux and Windows, installed the calibre binary, download the source code with bzr, set the "CALIBRE_DEVELOP_FROM" variable to point to the "src" directory and modify the "src/calibre/__init__.py" with the print statement.

Code:
vmplanet@kubuntu:~/calibre/src/calibre$ echo $CALIBRE_DEVELOP_FROM 
/home/vmplanet/calibre/src
Code:
vmplanet@kubuntu:~/calibre/src/calibre$ calibredb
Uso: calibredb orden [opciones] [argumentos]

calibredb es la interfaz de línea de órdenes para la base de datos de libros de calibre.

orden es una de:

.....
Code:
vmplanet@kubuntu-vm:~/calibre/src/calibre$ grep -n Hello __init__.py 
24:print 'Hello world!'
Instructions look quite easy but I can't reproduce
Coleccionista is offline   Reply With Quote
Old 03-01-2011, 02:42 PM   #2
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by Coleccionista View Post
I cannot get the "Hello world!" sample to print out ...
I've tried both in Linux and Windows, installed the calibre binary, download the source code with bzr, set the "CALIBRE_DEVELOP_FROM" variable to point to the "src" directory and modify the "src/calibre/__init__.py" with the print statement.
Instructions look quite easy but I can't reproduce
I'll assume you have downloaded the source correctly. Run Calibre. It doesn't matter how you start it. Does the version number on the lower left of the GUI have an asterisk after it? It should be "0.7.47*" not "0.7.47." If it does have the asterisk, then you are running from source. If it doesn't, and I suspect it doesn't, then your "CALIBRE_DEVELOP_FROM" variable isn't pointing correctly.

Make sure the variable is correct (in Windows, just type "SET" at a command prompt to check.) It should point to the src folder that has a cherrypy folder inside it. Get that part working first.
Starson17 is offline   Reply With Quote
 
Enthusiast
Old 03-01-2011, 02:56 PM   #3
Coleccionista
Connoisseur
Coleccionista began at the beginning.
 
Posts: 57
Karma: 40
Join Date: Aug 2010
Device: iPad, Kindle 3 Wi-Fi
Quote:
Originally Posted by Starson17 View Post
I'll assume you have downloaded the source correctly. Run Calibre. It doesn't matter how you start it. Does the version number on the lower left of the GUI have an asterisk after it? It should be "0.7.47*" not "0.7.47." If it does have the asterisk, then you are running from source. If it doesn't, and I suspect it doesn't, then your "CALIBRE_DEVELOP_FROM" variable isn't pointing correctly.

Make sure the variable is correct (in Windows, just type "SET" at a command prompt to check.) It should point to the src folder that has a cherrypy folder inside it. Get that part working first.

No, it does not. It's the calibre package from the Ubuntu distro (0.7.18)
But the folder and variable looks OK

Code:
vmplanet@kubuntu:~/calibre/src$ pwd
/home/vmplanet/calibre/src
vmplanet@kubuntu:~/calibre/src$ ls
calibre  cherrypy  odf  pyPdf  routes  templite

vmplanet@kubuntu:~/calibre/src$ echo $CALIBRE_DEVELOP_FROM 
/home/vmplanet/calibre/src
Coleccionista is offline   Reply With Quote
Old 03-01-2011, 03:39 PM   #4
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by Coleccionista View Post
It's the calibre package from the Ubuntu distro (0.7.18)
I'll let Kovid tackle this one, then, but I'd recommend installing the current version.
http://calibre-ebook.com/download_linux

0.7.18 is ancient, and there's no reason to develop on such an old version anyway.
Starson17 is offline   Reply With Quote
Old 03-01-2011, 03:59 PM   #5
Coleccionista
Connoisseur
Coleccionista began at the beginning.
 
Posts: 57
Karma: 40
Join Date: Aug 2010
Device: iPad, Kindle 3 Wi-Fi
I don't know if it was because of the old version or something else but as you pointed I unistalled the calibre package, performed the manual install for calibre 0.7.47 and right after installation.

Code:
Run "calibre" to start calibre
vmplanet@kubuntu:~/calibre/src$ echo $CALIBRE_DEVELOP_FROM
/home/vmplanet/calibre/src
vmplanet@kubuntu:~/calibre/src$ calibre
Hello world!
libprs500(5280)/ KSharedDataCache::Private::mapSharedMemory: Opening cache "/var/tmp/kdecache-vmplanet/icon-cache.kcache" page size is 4096
Ok, that was the easy part. Now to do something useful.

Thanks for your help.

Last edited by Coleccionista; 03-01-2011 at 04:04 PM.
Coleccionista is offline   Reply With Quote
Old 03-01-2011, 04:07 PM   #6
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by Coleccionista View Post
I don't know if it was because of the old version or something else but as you pointed I unistalled the calibre package, performed the manual install for calibre 0.7.47 and right after installation.
If the source you were running was current and the package was too old, then Calibre won't run from source. Every now and then Calibre introduces dependencies that only get installed with the full package.

Quote:
Thanks for your help.
You're welcome. There's lots to do.
Starson17 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
Content server - basic question Viseguy Calibre 2 09-04-2010 11:32 PM
Might be a basic question... emonti8384 Amazon Kindle 12 01-12-2010 07:58 PM
OK: a REALLY basic question ChicagoIrish Sony Reader 15 08-19-2009 04:08 PM
Basic question about the PRS-505 aegir Sony Reader 10 11-04-2008 02:20 AM
Basic question about Sony Store + RSS JeffASonyReader Sony Reader 3 01-24-2008 04:51 AM


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


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