05-31-2011, 11:33 AM | #1 |
Junior Member
Posts: 1
Karma: 10
Join Date: May 2011
Device: Galaxy Tab 10.1
|
Info to start working with Calibre source
Hello,
I'm new to Calibre. Where can I find any info to start working with the Calibre source? Such as directory structure and API documentation? Thanks, Samphan. |
05-31-2011, 11:54 AM | #2 |
Sigil & calibre developer
Posts: 2,487
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
Info for setting up a development environment manual.calibre-ebook.com/develop.html
User manual manual.calibre-ebook.com/ which does contain API documentation. Most of the documentation is in the code itself. If you have questions ask. |
Advert | |
|
06-29-2011, 01:13 PM | #3 |
Connoisseur
Posts: 96
Karma: 72130
Join Date: Nov 2008
Location: San Francisco Bay Area, CA, USA
Device: Sony PRS-505, Kindle DX 1st Gen, Kindle Fire 1st Gen
|
Hello. I read "Setting up a calibre development environment" in the user's manual but I am still confused about how to set up a Windows 7 development environment.
I would like to have two versions of calibre on my system:
The installer will not allow me to have two copies of calibre installed. When I run it again I'm asked asked to change, repair, or remove. To work around that I installed Cygwin so I have a unix-like environment on Windows. I then performed a bzr checkout of the source as described in the calibre manual. I went with Cygwin since I'm comfortable with the unix CLI and I expect to use the Launchpad SSH integration at some point. Is this a recommended setup or is there a better way? Can I have separate development and production installations on the same computer? I'm not sure what to do next. I assume I set CALIBRE_DEVELOP_FROM to point to the bzr checkout. Is that correct? Will that affect my use of calibre installed from the installer? Last edited by Halo; 06-29-2011 at 01:16 PM. |
06-29-2011, 01:48 PM | #4 |
creator of calibre
Posts: 44,346
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
If you want a separate "dev" calibre and normal calibre, write a .bat file that launches the dev calibre like this
set CALIBRE_DEVELOP_FROM=whatever calibre --with-library c:\path\to\test\library Another bat file for normal calibre calibre --with-library c:\path\to\normal\library |
06-29-2011, 02:48 PM | #5 | |
Grand Sorcerer
Posts: 11,940
Karma: 7219261
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Regarding the installer, I almost never run calibre other than from source so I don't care what calibre binary is installed. I run the installer from time to time because calibre source can depend on DLLs and other binary files in the binary version. My experience is that updating calibre binary once every month or so is sufficient, but there have been times where I must do it more often. There is no problem with updating the binary more often, but I am lazy. If I really need to run a calibre binary, I do it in a virtual machine so I have full control over what it sees. |
|
Advert | |
|
06-29-2011, 04:36 PM | #6 | ||
Connoisseur
Posts: 96
Karma: 72130
Join Date: Nov 2008
Location: San Francisco Bay Area, CA, USA
Device: Sony PRS-505, Kindle DX 1st Gen, Kindle Fire 1st Gen
|
Quote:
Code:
C:\Users\owner>set CALIBRE_DEVELOP_FROM=c:\cygwin\home\owner\calibre C:\Users\owner>echo %CALIBRE_DEVELOP_FROM% c:\cygwin\home\owner\calibre C:\Users\owner>calibre --with-library "C:\Users\owner\Calibre Test" C:\Users\owner> Quote:
|
||
06-29-2011, 04:41 PM | #7 |
creator of calibre
Posts: 44,346
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
set CALIBRE_DEVELOP_FROM=c:\cygwin\home\owner\calibre\ src
And note that you will only see print statements if you run calibre in debug mode calibre-debug -g |
06-29-2011, 04:46 PM | #8 |
Connoisseur
Posts: 96
Karma: 72130
Join Date: Nov 2008
Location: San Francisco Bay Area, CA, USA
Device: Sony PRS-505, Kindle DX 1st Gen, Kindle Fire 1st Gen
|
|
06-29-2011, 04:51 PM | #9 |
Connoisseur
Posts: 96
Karma: 72130
Join Date: Nov 2008
Location: San Francisco Bay Area, CA, USA
Device: Sony PRS-505, Kindle DX 1st Gen, Kindle Fire 1st Gen
|
|
07-18-2011, 04:18 PM | #10 |
Guru
Posts: 858
Karma: 1027478
Join Date: Aug 2010
Location: South of France
Device: kindle dx; eDGe
|
This may be a stupid question but is it possible to get Calibre source code in something like a zip or tgz file.
The reason I'm asking is because I use OS/2 and we don't have a port of Bazaar and I don't want to port that first. I want to try and port Calibre to OS/2 as we have python and QT4 ported so I think it should be possible (quite a lot of the newer software we use is ported from Linux). |
07-18-2011, 04:22 PM | #11 |
Grand Sorcerer
Posts: 11,940
Karma: 7219261
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Go to http://sourceforge.net/projects/calibre/files/ and download the tar.gz for the release of your choice.
|
07-18-2011, 05:00 PM | #12 | |
Guru
Posts: 858
Karma: 1027478
Join Date: Aug 2010
Location: South of France
Device: kindle dx; eDGe
|
Quote:
|
|
10-14-2011, 11:36 PM | #13 |
Member
Posts: 15
Karma: 10
Join Date: Oct 2011
Device: iPad,Kindle3
|
.....
Last edited by katsu; 10-14-2011 at 11:43 PM. |
10-14-2011, 11:42 PM | #14 |
Member
Posts: 15
Karma: 10
Join Date: Oct 2011
Device: iPad,Kindle3
|
I read manual "Setting up a calibre development environment".
does not print "Hello, world!" where should I check? $ python --version Python 2.6.5 $ cat /etc/redhat-release CentOS Linux release 6.0 (Final) I extract source to /home/katsu/calibre/calibre $ ls ~/calibre/calibre/ COPYRIGHT INSTALL README imgsrc session.vim src Changelog.old.yaml LICENSE format_docs recipes setup Changelog.yaml LICENSE.rtf icons resources setup.py do Binary install with: sudo python -c "import urllib2; exec urllib2.urlopen('http://status.calibre-ebook.com/linux_installer').read(); main()" $ which calibre /usr/bin/calibre $ echo $PATH /usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin set CALIBRE_DEVELOP_FROM=/home/katsu/calibre/calibre/src edit src/calibre/__init__.py (add 'print ("Hello, world 3")' at line 1) run calibredb (it show Usage but no show "Hello, world!") run calibre --verbose (it start normally but no show "Hello, world!") and run calibre-debug -g $ calibre-debug -g Starting up... Started up in 1.0858399868 $ (it start normally but no show "Hello, world!", close it, return to shell normally) I've probably missed something.. |
10-14-2011, 11:46 PM | #15 |
creator of calibre
Posts: 44,346
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Make sure you are running the official calibre binary not your distro's calibre package.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sony Reader Information, Start-Up and Reset Guide | grooks | Sony Reader | 2 | 12-22-2010 07:06 PM |
Prscustomizer not working and info on unicode | shilpa | Sony Reader | 1 | 08-14-2009 01:35 AM |
California to start using Open Source etextbooks | Nate the great | News | 87 | 05-11-2009 12:18 PM |
Different info between reader and Calibre db | eyp | Calibre | 8 | 03-19-2009 03:53 AM |
Sun's McNealy working on open source textbooks | Bob Russell | News | 8 | 12-12-2006 02:03 PM |