Mobileread
Calibre Portable and Libraries
#1  atjnjk 12-14-2010, 08:08 AM
I'm using calibre portable (.bat file in Windows) with only one library. Is there a way to use the portable version with multiple libraries?
Reply 

#2  itimpi 12-14-2010, 12:59 PM
There is no problem using multiple libraries. The .bat file specifies what library calibre starts with. You can either have different .bat files to start Calibre with different libraries, or having started Calibre with one library press the Library button on the main toolbar to switch to another one.
Reply 

#3  atjnjk 12-15-2010, 12:44 AM
Quote itimpi
You can either have different .bat files to start Calibre with different libraries, or having started Calibre with one library press the Library button on the main toolbar to switch to another one.
Starting calibre with different .bat files works great but it's a little inconvenient.
Using the Library button doesn't seem to work as expected. (This is the reason why I think calibre portable doesn't work with multiple libraries.)
Reply 

#4  chaley 12-15-2010, 12:48 AM
Quote atjnjk
Using the Library button or the context menu 'Copy to library' doesn't seem to work as expected. (This is the reason why I think calibre portable doesn't work with multiple libraries.)
OK, I'll bite.

What does it do compared to what you expect it to do?
Reply 

#5  atjnjk 12-15-2010, 01:04 AM
When I switch library (using the dropdown next to Library button), I expect Calibre to 'switch library' from library1 to library2 (meaning: calibre shows library2's books). But it seems after switching, calibre shows library1's books as library2's ones and thinks it's working with library2. After closing calibre, I switched to library1 using the .bat file then used 'Library Maintenance > Check Library'. It showed that there were some extra titles and authors (which were library2's books).
I haven't tried 'Copy to library' (I'm a scaredy-cat), so I don't know if it works or not.
Reply 

#6  Lady Fitzgerald 12-15-2010, 01:35 AM
Quote atjnjk
When I switch library (using the dropdown next to Library button), I expect Calibre to 'switch library' from library1 to library2 (meaning: calibre shows library2's books). But it seems after switching, calibre shows library1's books as library2's ones and thinks it's working with library2. After closing calibre, I switched to library1 using the .bat file then used 'Library Maintenance > Check Library'. It showed that there were some extra titles and authors (which were library2's books).
I haven't tried 'Copy to library' (I'm a scaredy-cat), so I don't know if it works or not.
Make copies of your library folders before trying anything so you can restore them if something should go horribly wrong. I'm a coward myself so I backup the heck out of everything before I start experimenting; it's saved my bacon more than once.
Reply 

#7  chaley 12-15-2010, 01:56 AM
Quote atjnjk
When I switch library (using the dropdown next to Library button), I expect Calibre to 'switch library' from library1 to library2 (meaning: calibre shows library2's books). But it seems after switching, calibre shows library1's books as library2's ones and thinks it's working with library2. After closing calibre, I switched to library1 using the .bat file then used 'Library Maintenance > Check Library'. It showed that there were some extra titles and authors (which were library2's books).
I haven't tried 'Copy to library' (I'm a scaredy-cat), so I don't know if it works or not.
Well, I wouldn't expect that behavior either.

Is there any chance that one library is in a subdirectory of the other?

Also, what version of calibre are you running? A lot of the pre-built releases are very old. You might be seeing bugs that have been long fixed. My understanding is that if you install calibre onto a USB drive and use the .bat file that changes the preferences location, then you end up with a portable version. Itimpi knows much more about this than I do, so I hope he will correct me if I am spreading lies.
Reply 

#8  itimpi 12-15-2010, 02:29 AM
The whole idea of the batch file approach to creating a mobile calibre is that it can be used with any calibre release so it should be easy enough to keep up-to-date with Calibre releases.

I will do some checks later today myself to see if there is some (obscure) bug that can occur when running in this mode. I use the batch file myself all the time but I do not do much in the way of library switching.
Reply 

#9  DoctorOhh 12-15-2010, 02:47 AM
Quote atjnjk
When I switch library (using the dropdown next to Library button), I expect Calibre to 'switch library' from library1 to library2 (meaning: calibre shows library2's books). But it seems after switching, calibre shows library1's books as library2's ones and thinks it's working with library2. After closing calibre, I switched to library1 using the .bat file then used 'Library Maintenance > Check Library'. It showed that there were some extra titles and authors (which were library2's books).
When I started using more then one library I had to stop using the batch file to point to the library and metadata.db file because it caused problems when trying to switch libraries. Since I really didn't care I just changed my setup.

Now all I point to is a common configuration so every machine I'm on is using the same plugins and settings. I just install calibre on each machine pointing to the same library (in my dropbox).

I think itimpi's suggestion about a different batch file for each library might be best. I wouldn't be surprised though if the copy between library had problems.

Good Luck.
Reply 

#10  chaley 12-15-2010, 03:40 AM
Quote dwanthny
When I started using more then one library I had to stop using the batch file to point to the library and metadata.db file because it caused problems when trying to switch libraries. Since I really didn't care I just changed my setup.

Now all I point to is a common configuration so every machine I'm on is using the same plugins and settings. I just install calibre on each machine pointing to the same library (in my dropbox).
Do you use a batch file to set the CALIBRE_CONFIG_DIRECTORY environment variable, or do you have it hard-wired into your windows environment?

I set the env var in a batch file, but do not use --with-library there. I have no trouble switching libraries. That said, looking at the code I don't see any reason why --with-library would make switching libraries problematic. All it does is set the library preference before starting the GUI.
Reply 

  Next »  Last »  (1/2)
Today's Posts | Search this Thread | Login | Register