![]() |
#1 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Sep 2008
Location: Derbyshire, UK
Device: PRS-505
|
![]()
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... |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,146
Karma: 27110894
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.
|
![]() |
![]() |
![]() |
#3 |
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Oct 2007
Location: Montreal, Canada
Device: Kindle
|
How do i write a new script?
|
![]() |
![]() |
![]() |
#4 |
Zealot
![]() ![]() 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" |
![]() |
![]() |
![]() |
#5 |
Member
![]() 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... |
![]() |
![]() |
![]() |
#6 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,146
Karma: 27110894
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 |
![]() |
![]() |
![]() |
#7 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,146
Karma: 27110894
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)
|
![]() |
![]() |
![]() |
#8 |
Junior Member
![]() 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!" ![]() |
![]() |
![]() |
![]() |
#9 | |
Member
![]() Posts: 11
Karma: 10
Join Date: Sep 2008
Location: Milton Keynes, UK
Device: iPad, Sony PRS-505
|
Quote:
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!) |
|
![]() |
![]() |
![]() |
#10 |
Junior Member
![]() 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 |
![]() |
![]() |
![]() |
#11 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,146
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Just run
Code:
calibre --with-library /path/to/new_library |
![]() |
![]() |
![]() |
#12 |
Enthusiast
![]() 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.
|
![]() |
![]() |
![]() |
#13 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,832
Karma: 11844413
Join Date: Jan 2007
Location: Tampa, FL USA
Device: Kindle Touch
|
Quote:
That should do it. BOb |
|
![]() |
![]() |
![]() |
#14 |
Enthusiast
![]() 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.
|
![]() |
![]() |
![]() |
#15 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,832
Karma: 11844413
Join Date: Jan 2007
Location: Tampa, FL USA
Device: Kindle Touch
|
Quote:
"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 |
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |