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 01-05-2009, 03:51 AM   #1
sn123py
Member
sn123py began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jan 2009
Device: Sony PRS-T1, Kindle4NT
portable database?

Hi,

is it possible to store the database (and ebook-files) on removable disk and use them on two different Computers with an portable Version of calibre?

I tried to copy the database-file (metadata.db) along with the ebooks onto removable disk, removed the entry "library_path" from global.py and tried to import the database on removable disk -> calibre crashed ...

Any chance of putting calibre itself on removable disk and get settings from a global.py in program-directory (maybe with a non-absolut path)?

regards,
Friedhelm.
sn123py is offline   Reply With Quote
Old 01-05-2009, 04:05 AM   #2
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,051
Karma: 777825
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
There is no problem with the Calibre database and books being on a removable drive if calibre is already installed on both machines. Simply use the option in Calibre to change the location of the library/metadata files to the portable drive after starting up Calibre.

As to the question as to whether it is possible to avoid installing calibre on machines and running purely from the remvable drive I have no idea - hopefully Kovid or someone else will have a view on this when they come online. Intriguing idea though.
itimpi is online now   Reply With Quote
Old 01-05-2009, 11:04 AM   #3
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: 25,931
Karma: 5036099
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use the --with-library option to the command calibre to start it with a library located elsewhere.

calibre is not fully portable since it uses standard locations to dave config options, but if you dont care about config options eing portable, it should be perfectly possible to run it from a removable disk.
kovidgoyal is online now   Reply With Quote
Old 01-05-2009, 12:26 PM   #4
Amalthia
Guru
Amalthia once ate a cherry pie in a record 7 seconds.Amalthia once ate a cherry pie in a record 7 seconds.Amalthia once ate a cherry pie in a record 7 seconds.Amalthia once ate a cherry pie in a record 7 seconds.Amalthia once ate a cherry pie in a record 7 seconds.Amalthia once ate a cherry pie in a record 7 seconds.Amalthia once ate a cherry pie in a record 7 seconds.Amalthia once ate a cherry pie in a record 7 seconds.Amalthia once ate a cherry pie in a record 7 seconds.Amalthia once ate a cherry pie in a record 7 seconds.Amalthia once ate a cherry pie in a record 7 seconds.
 
Amalthia's Avatar
 
Posts: 949
Karma: 1960
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650
I think the reason people like portable applications on usb is because we can't always install Calibre on work computers but would still like acess to the program.
Amalthia is offline   Reply With Quote
Old 01-05-2009, 12:47 PM   #5
astrodad
Guru
astrodad ought to be getting tired of karma fortunes by now.astrodad ought to be getting tired of karma fortunes by now.astrodad ought to be getting tired of karma fortunes by now.astrodad ought to be getting tired of karma fortunes by now.astrodad ought to be getting tired of karma fortunes by now.astrodad ought to be getting tired of karma fortunes by now.astrodad ought to be getting tired of karma fortunes by now.astrodad ought to be getting tired of karma fortunes by now.astrodad ought to be getting tired of karma fortunes by now.astrodad ought to be getting tired of karma fortunes by now.astrodad ought to be getting tired of karma fortunes by now.
 
astrodad's Avatar
 
Posts: 945
Karma: 568242
Join Date: Dec 2007
Device: Kindle Paperwhite 1, iPad, iPhone 5
Quote:
Originally Posted by Amalthia View Post
I think the reason people like portable applications on usb is because we can't always install Calibre on work computers but would still like acess to the program.
True, there is no portable version of calibre since it requires the Python runtime to be installed. So while you can take your database with you, the program needs to be installed on each system.
astrodad is offline   Reply With Quote
Old 01-05-2009, 12:52 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: 25,931
Karma: 5036099
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by jplumey View Post
True, there is no portable version of calibre since it requires the Python runtime to be installed. So while you can take your database with you, the program needs to be installed on each system.
No calibre does not need python to be installed
kovidgoyal is online now   Reply With Quote
Old 01-06-2009, 05:48 AM   #7
sn123py
Member
sn123py began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jan 2009
Device: Sony PRS-T1, Kindle4NT
solved

this is oh so cool.
  • installed calibre and created a database.
  • moved database including subfolders to icy-box (drive g:, folder calibre-db)
  • moved calibre program directory to icy-box (drive g:, folder calibre)
  • removed the folder calibre in AppData\Roaming (pretending a new computer)
  • created a bat-file on icy-box (drive g:, folder \) with content below.

Code:
@echo off
cd calibre
calibre.exe --with-library  ..\calibre-db
works like a charme. so, from now, calibre is portable (ok, settings are reset on every new Computer, buts that is work, i'll do with a smile)

Suggestion: how about a calibre-zip without installer? so one could simply unpack this zipfile and has the base for a portable application?

this will surely be one of my new favourite apps :-)

greetings,
Friedhelm.
sn123py is offline   Reply With Quote
Old 01-06-2009, 12:06 PM   #8
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: 25,931
Karma: 5036099
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Cool, next release of calibre will have support for the environment variable

CALIBRE_CONFIG_DIRECTORY

As for a zip file release, creating such a zip file is trivial, since all you have to do is install the exe insaller, and then zip up the calibre directory.
kovidgoyal is online now   Reply With Quote
Old 01-07-2009, 04:43 AM   #9
sn123py
Member
sn123py began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jan 2009
Device: Sony PRS-T1, Kindle4NT
*smile*
sn123py is offline   Reply With Quote
Old 01-21-2009, 01:33 AM   #10
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 2,310
Karma: 5761596
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PRS-350, Nexus S, Galaxy S, Nook Color, iPhone4, iPT4, iPad 2012
Portable Calibre sounds awesome. I see the CALIBRE_CONFIG_DIRECTORY is already implemented. Where do I change it?

Last edited by ilovejedd; 01-21-2009 at 01:37 AM.
ilovejedd is offline   Reply With Quote
Old 01-21-2009, 01:50 AM   #11
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: 25,931
Karma: 5036099
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
it's an environment variable. calibre will use it to determine where to read config files from.
kovidgoyal is online now   Reply With Quote
Old 01-21-2009, 04:33 AM   #12
Format C:
Guru
Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.
 
Posts: 753
Karma: 1496807
Join Date: Jul 2008
Location: The Third World
Device: iLiad + PRS-505 + Kindle 3
So, you can make three directories for the Linux/OSX/Windows binaries, one for the database and create three batch/shell script to set the environment variables and launch the application....

A real cross-platform application...

Format C: is offline   Reply With Quote
Old 01-21-2009, 10:25 AM   #13
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 2,310
Karma: 5761596
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PRS-350, Nexus S, Galaxy S, Nook Color, iPhone4, iPT4, iPad 2012
Okay, so just read up on environment variables since I had no idea what they were. How do I create a DOS/Windows batch file that automatically changes the config path relative to the location of Calibre?

Say I have the following directory structure:
Quote:
PortableCalibre
|- Calibre (copy of install directory)
|- config (location of settings)
|- calibre-db (location of database and books)
|- portablecalibre.bat
Will the following batch file work (portablecalibre.bat):
Code:
@echo off
cd config
setlocal
set CALIBRE_CONFIG_DIRECTORY = %cd%
cd..
cd calibre
calibre.exe --with-library  ..\calibre-db
endlocal
Another question, if Calibre is already installed on the PC, am I correct in assuming the above batch file would only change settings for "portable calibre" and the version installed on the computer would be unaffected by the path change?

Thanks!
ilovejedd is offline   Reply With Quote
Old 01-21-2009, 12:38 PM   #14
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: 25,931
Karma: 5036099
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by ilovejedd View Post
Okay, so just read up on environment variables since I had no idea what they were. How do I create a DOS/Windows batch file that automatically changes the config path relative to the location of Calibre?

Say I have the following directory structure:


Will the following batch file work (portablecalibre.bat):
Code:
@echo off
cd config
setlocal
set CALIBRE_CONFIG_DIRECTORY = %cd%
cd..
cd calibre
calibre.exe --with-library  ..\calibre-db
endlocal
Another question, if Calibre is already installed on the PC, am I correct in assuming the above batch file would only change settings for "portable calibre" and the version installed on the computer would be unaffected by the path change?

Thanks!
Also add the portable calibre directory to the beginning of your PATH. I'm not bat file expert, so I'll defer answering that to someone who is
kovidgoyal is online now   Reply With Quote
Old 01-21-2009, 12:57 PM   #15
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 2,310
Karma: 5761596
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PRS-350, Nexus S, Galaxy S, Nook Color, iPhone4, iPT4, iPad 2012
Quote:
Originally Posted by kovidgoyal View Post
Also add the portable calibre directory to the beginning of your PATH. I'm not bat file expert, so I'll defer answering that to someone who is
Thanks. I just did a quick check (echo %cd%) and %cd% gives you the full path of the current directory. Keeping my fingers crossed and hoping it will work.
ilovejedd is offline   Reply With Quote
Reply

Tags
calibre, portable

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
different database for different categories reup Calibre 3 06-20-2010 11:25 AM
Readonly Database seanbw Calibre 6 03-17-2010 06:30 PM
What Database? LadyLou Calibre 8 02-12-2010 06:32 AM
Database outage Alexander Turcic Announcements 2 07-14-2005 04:44 PM
Database troubles Alexander Turcic Announcements 2 04-20-2005 01:02 PM


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


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