Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Related Tools

Notices

Reply
 
Thread Tools Search this Thread
Old 12-14-2010, 08:08 AM   #1
atjnjk
Zealot
atjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enough
 
Posts: 107
Karma: 554
Join Date: Oct 2008
Device: none
Calibre Portable and Libraries

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?
atjnjk is offline   Reply With Quote
Old 12-14-2010, 12:59 PM   #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,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
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.
itimpi is offline   Reply With Quote
Advert
Old 12-15-2010, 12:44 AM   #3
atjnjk
Zealot
atjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enough
 
Posts: 107
Karma: 554
Join Date: Oct 2008
Device: none
Quote:
Originally Posted by itimpi View Post
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.)

Last edited by atjnjk; 12-15-2010 at 01:10 AM.
atjnjk is offline   Reply With Quote
Old 12-15-2010, 12:48 AM   #4
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,703
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by atjnjk View Post
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?
chaley is offline   Reply With Quote
Old 12-15-2010, 01:04 AM   #5
atjnjk
Zealot
atjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enough
 
Posts: 107
Karma: 554
Join Date: Oct 2008
Device: none
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.

Last edited by atjnjk; 12-15-2010 at 01:13 AM.
atjnjk is offline   Reply With Quote
Advert
Old 12-15-2010, 01:35 AM   #6
Lady Fitzgerald
Wizard
Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.
 
Lady Fitzgerald's Avatar
 
Posts: 2,013
Karma: 251649
Join Date: Apr 2010
Location: Tempe, AZ, USA, Earth
Device: JetBook Lite (away from home) + 1 spare, 32" TV (at home)
Quote:
Originally Posted by atjnjk View Post
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.
Lady Fitzgerald is offline   Reply With Quote
Old 12-15-2010, 01:56 AM   #7
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,703
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by atjnjk View Post
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.
chaley is offline   Reply With Quote
Old 12-15-2010, 02:29 AM   #8
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,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
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.
itimpi is offline   Reply With Quote
Old 12-15-2010, 02:47 AM   #9
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by atjnjk View Post
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.
DoctorOhh is offline   Reply With Quote
Old 12-15-2010, 03:40 AM   #10
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,703
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by dwanthny View Post
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.
chaley is offline   Reply With Quote
Old 12-15-2010, 04:11 AM   #11
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by chaley View Post
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?
Currently I only use the batch file to set the config directory and start calibre.

Quote:
Originally Posted by chaley View Post
I set the env var in a batch file, but do not use --with-library there. I have no trouble switching libraries.
With just the config set in the batch file I have no problem switching libraries either.

Previously I was setting these three variables

CALIBRE_CONFIG_DIRECTORY
CALIBRE_LIBRARY_DIRECTORY
CALIBRE_OVERRIDE_DATABASE_PATH

and this was when I experienced trouble. Wallowing in my ignorance I assumed it was a Windows problem. I figured someone that cared more than I did would come forward. Since it has been months with no report I figured it was just me.

I'm happy with just using the variable for the config directory, but thought I would speak up and let the OP know that he isn't alone.
DoctorOhh is offline   Reply With Quote
Old 12-15-2010, 04:21 AM   #12
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,703
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by dwanthny View Post
Previously I was setting these three variables

CALIBRE_CONFIG_DIRECTORY
CALIBRE_LIBRARY_DIRECTORY
CALIBRE_OVERRIDE_DATABASE_PATH

and this was when I experienced trouble. Wallowing in my ignorance I assumed it was a Windows problem. I figured someone that cared more than I did would come forward. Since it has been months with no report I figured it was just me.
Ahhh, I forgot about CALIBRE_OVERRIDE_DATABASE_PATH.

Looking at the code, setting CALIBRE_OVERRIDE_DATABASE_PATH will totally break multi-library operations. It will *always* use the same database, no matter what library folder hierarchy is being used. For example, copy to library will copy to the other folder hierarchy but update the current database. Not good.

I think that change library (and copy to library) should be disabled when CALIBRE_OVERRIDE_DATABASE_PATH is used, and will submit code to do just that.
chaley is offline   Reply With Quote
Old 12-15-2010, 04:39 AM   #13
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by chaley View Post
I think that change library (and copy to library) should be disabled when CALIBRE_OVERRIDE_DATABASE_PATH is used, and will submit code to do just that.
Good idea and with the restriction, if applicable, maybe a updated blurb on this page explaining the limitation.
DoctorOhh is offline   Reply With Quote
Old 12-15-2010, 06:16 AM   #14
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,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
I will have a look a the batch file, and if the CALIBRE_LIBRARY_PATH and CALIBRE_OVERRIDE_DATABASE_PATH are pointing to the same location (which I guess will be the case for the vast majority of users) avoid setting the CALIBRE_OVERRIDE_DATABASE_PATH at all. This will mean that the additional check chaley mentions above will not affect most users.
itimpi 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
suddenly a problem with Calibre libraries Rie142 Calibre 2 08-11-2010 11:08 AM
Multiple Calibre Libraries on Mac OS X Starganderfish Calibre 3 05-24-2010 05:21 AM
Sync two calibre libraries esears Calibre 16 02-18-2010 07:39 PM
Merging Calibre Libraries pope_a Calibre 3 01-17-2010 09:51 AM
Consolidating 2 Calibre Libraries mrgiedrnkr Calibre 1 08-12-2009 05:34 PM


All times are GMT -4. The time now is 01:50 PM.


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