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 10-13-2008, 05:39 PM   #1
DoctorYof
Junior Member
DoctorYof began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Sep 2008
Location: Derbyshire, UK
Device: PRS-505
Question More than one Library?

Does anyone know whether it is possible to have more than one library set up and to switch between them? Would changing the library path achieve this? Or can you run more than one installation of Calibre with different libraries on the same computer (running Windows Vista)?

I have a big library including the whole 'GutenTorrent' collection (~13,000 books altogether) and don't want to lose Calibre's excellent searching. On the other hand I'd prefer a more responsive version of Calibre for day-to-day use - 15,000 books slows some things down a lot! (for example, Kovid did a sterling job halving my startup time a few updates ago, but that was from 4 minutes down to 2 minutes, and it takes about a minute to add any new book to this mega-library)

Having a smaller sized (some might say "sensible sized") library for most of the time would be handy...
DoctorYof is offline   Reply With Quote
Old 10-13-2008, 06:11 PM   #2
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,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
locate the file global.py It is a plain txt file that contains the library path calibre uses. You should be able to write a simple script to replace that path and then launch calibre.
kovidgoyal is offline   Reply With Quote
Advert
Old 10-16-2008, 07:08 AM   #3
don1011
Enthusiast
don1011 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Oct 2007
Location: Montreal, Canada
Device: Kindle
How do i write a new script?
don1011 is offline   Reply With Quote
Old 10-16-2008, 08:53 AM   #4
jedavis1
Zealot
jedavis1 doesn't litterjedavis1 doesn't litter
 
jedavis1's Avatar
 
Posts: 103
Karma: 148
Join Date: Aug 2008
Location: Huntington, IN US
Device: Sony PRS-505
It would be esiest to do it with a simple .bat file (assuming you are on windows) but in Linux it would be similar. It would look something like this:

Find and modify the global.py to reflect the path to library 1 and save it as "global.lib1" and then change it to reflect the path to library 2 and save it as "global.lib2"

Copy and paste this into notepad and save it as "Library2.bat"

rem Change global.py for library 2 and launch Calibre
copy "c:\file path\global.lib2" "c:\file path\global.py" /y
"C:\Program Files\calibre\calibre.exe"

Copy and paste this into notepad and save it as "Library1.bat"

rem Change global.py for library 1 and launch Calibre
copy "c:\file path\global.lib1" "c:\file path\global.py" /y
"C:\Program Files\calibre\calibre.exe"
jedavis1 is offline   Reply With Quote
Old 10-16-2008, 11:08 AM   #5
JeFurry
Member
JeFurry began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Sep 2008
Location: Milton Keynes, UK
Device: iPad, Sony PRS-505
Quite a few programs on Mac OS X, such as iPhoto, will display a requester asking which library you'd like to use if you launch with Option (alt) held down.

I'd love to see something like this in Calibre, which would give you the choice of opening multiple known libraries or creating a new one. It sounds like a relatively simple addition if approved.

I could then have my main unsorted library of ~3000 books (mainly PD or my own conversions from other formats, thus with VERY irregular tagging), a "sorted" library of stuff that I'm keeping on the Reader, and a third library of stuff I am waiting to clean up and install when I have time...
JeFurry is offline   Reply With Quote
Advert
Old 10-16-2008, 01:02 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,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
On OSX or linux the follwing script will do the trick

Code:
#!/bin/bash

LIBRARY=/Users/kovid/library

calibre-debug -c "from calibre.utils.config import prefs; prefs.set('library_path', $LIBRARY)"
calibre
Make such a script for each library you want to use.
kovidgoyal is offline   Reply With Quote
Old 10-16-2008, 09:45 PM   #7
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,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I've added a --with-library option to the calibre command (will appear in 0.4.98)
kovidgoyal is offline   Reply With Quote
Old 10-17-2008, 02:24 AM   #8
DoctorYof
Junior Member
DoctorYof began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Sep 2008
Location: Derbyshire, UK
Device: PRS-505

As a normally reticent Brit this goes against the grain, but I've just got to say, "Kovid, you are the man!"
DoctorYof is offline   Reply With Quote
Old 10-17-2008, 05:14 AM   #9
JeFurry
Member
JeFurry began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Sep 2008
Location: Milton Keynes, UK
Device: iPad, Sony PRS-505
Quote:
Originally Posted by DoctorYof View Post
As a normally reticent Brit this goes against the grain, but I've just got to say, "Kovid, you are the man!"
I'm another Brit who frequently lurks and rarely posts, but I'll second this. Can I just encourage anyone who's not yet done so to make a donation to support Calibre? The link is on the Calibre website ( http://calibre.kovidgoyal.net ). Kovid has done a considerable amount of work on the program and has been extremely helpful and informative on these forums. Even a small amount of money is worthwhile - I sent $20, and at this rate I might even do it again before long!

Such donations help justify the time and effort invested in the project, and encourage further development, and as the comments above have shown, Kovid is open to suggestions and requests from the users.

Thanks, Kovid.

(PS I wasn't asked or bribed to say this in any way!)
JeFurry is offline   Reply With Quote
Old 10-19-2008, 06:47 AM   #10
Sallytrafic
Junior Member
Sallytrafic began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Sep 2008
Device: Sony Reader
The Gui looks the same to me even after upgrading to .98

I don't know where or how to put the script in that you gave. Trouble with an apple is that its used just as any other domestic appliance in my house and I haven't a clue how to delve in the terminal. Should I be amending the global.py file with a text editor?

There are two other files at the same location gui.py and dynamic.pickle.

Can't it be an option on start up to choose a library like on iPhoto etc. Sorry to be so thick about computers, its obviously beyond me to get two or more libraries without more help.

Currently my global.py file reads as follows:

# calibre wide preferences

### Begin group: DEFAULT

# database path
# Path to the database in which books are stored
database_path = '/Users/Frank/library1.db'

# filename pattern
# Pattern to guess metadata from filenames
filename_pattern = u'(?P<title>.+) - (?P<author>[^_]+)'

# isbndb com key
# Access key for isbndb.com
isbndb_com_key = ''

# network timeout
# Default timeout for network operations (seconds)
network_timeout = 5

# library path
# Path to directory in which your library of books is stored
library_path = u'/Users/Frank/Documents/eBooks'

# language
# The language in which to display the user interface
language = 'en'

# output format
# The default output format for ebook conversions.
output_format = 'LRF'

# read file metadata
# Read metadata from files
read_file_metadata = True

# migrated
# For Internal use. Don't modify.
migrated = True
Sallytrafic is offline   Reply With Quote
Old 10-19-2008, 12:10 PM   #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: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Just run

Code:
calibre --with-library /path/to/new_library
kovidgoyal is offline   Reply With Quote
Old 10-19-2008, 07:10 PM   #12
don1011
Enthusiast
don1011 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Oct 2007
Location: Montreal, Canada
Device: Kindle
My question is certainly stupid but i don't know how to use that code. I know about command promt. I paste the code, calbre opened but nothing different.
don1011 is offline   Reply With Quote
Old 10-19-2008, 08:07 PM   #13
pilotbob
Grand Sorcerer
pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.
 
pilotbob's Avatar
 
Posts: 19,832
Karma: 11844413
Join Date: Jan 2007
Location: Tampa, FL USA
Device: Kindle Touch
Quote:
Originally Posted by don1011 View Post
My question is certainly stupid but i don't know how to use that code. I know about command promt. I paste the code, calbre opened but nothing different.
When you create a shortcut (icon) in your programs folder or on your desktop you specify a command to run the application. Generally it is just the program name, calibre.exe. If you right click on the shortcut and select properties you can edit the command line that is used to run the app adding the parameters. Once you've done that pointing to your first library... then copy the shortcut and edit it's properties and modify the command line to point to a different library.

That should do it.

BOb
pilotbob is offline   Reply With Quote
Old 10-20-2008, 07:08 AM   #14
don1011
Enthusiast
don1011 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Oct 2007
Location: Montreal, Canada
Device: Kindle
Thanks you for the information. In the new short cut, do i have just to modify the target with the new code. Do i have to delete the old target with the the new code or just add? I tried many things and it did not work.
don1011 is offline   Reply With Quote
Old 10-20-2008, 03:13 PM   #15
pilotbob
Grand Sorcerer
pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.
 
pilotbob's Avatar
 
Posts: 19,832
Karma: 11844413
Join Date: Jan 2007
Location: Tampa, FL USA
Device: Kindle Touch
Quote:
Originally Posted by don1011 View Post
Thanks you for the information. In the new short cut, do i have just to modify the target with the new code. Do i have to delete the old target with the the new code or just add? I tried many things and it did not work.
You would have two sortcuts. In one you would have a target of:

"c:\program files\calibre\calibre.exe" --with-library /path/to/library1

Then in the other shortcut you would have a target of:

"c:\program files\calibre\calibre.exe" --with-library /path/to/library2

Of course, you are replacing the /path/to/library part with the actual path you want to use. I assume if there is no library db there one will be created.

Make sense? I assume you could only run one at a time... but Kovid would have to answer that.

BOb
pilotbob 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
[Old Thread] import library or export to single file add to existing library PCreighton Calibre 4 04-10-2011 01:08 AM
Sony Reader Library running, but Library doesn't show on screen wyldmint Sony Reader 0 08-29-2010 01:59 AM
How to direct Library books to Calibre instead of Sony Reader Library onebookie Calibre 3 07-19-2010 11:31 AM
How to move public library book from ADE to Sony Library? mom2three Sony Reader 3 06-30-2010 05:26 AM
505 for library ebooks & disfunctional sony library BookishMom Sony Reader 11 05-20-2009 12:43 AM


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


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