Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-05-2011, 04:49 AM   #1
burbleburble
Connoisseur
burbleburble began at the beginning.
 
Posts: 52
Karma: 38
Join Date: Jun 2011
Device: Kindle 3
Calibre Libraries

Thank you Kovid Goyal for your wonderful Calibre!

I use Calibre Portable, and maintain more than one library on a portable drive. Every time I plug the drive in to a different computer, the drive name changes. So I took to using relative paths for the different libraries, '../../MomsLibrary' for example. This works fine, but every time I open the library, calibre creates a 'new' library path with the full path and drive letter. And the library menu quickly gets very cluttered!

From what I know of programming python, I realize it would be fairly easy to check if the path is relative, and leave it that way, instead of adding every new drive/fullpath. Would it possible to implement this? Thanks in advance!

(And maybe even an option in the 'Switch/create library' to choose a library using a 'relative path'; twould be much easier then coding in and working out all those '../../' etc.!)
burbleburble is offline   Reply With Quote
Old 12-05-2011, 05:04 AM   #2
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
Moderator Notice
Moved the thread to general calibre forum. The development forum is not the place to ask for new features unless you make it clear you are willing to develop the feature yourself. Please read the "PLEASE READ BEFORE POSTING - The purpose of this subforum" sticky post from the top of the Development forum.

The forums are good places to seek out interest in new features but to ensure a request doesn't get lost learn how to submit feature requests here.

Last edited by DoctorOhh; 12-05-2011 at 05:09 AM.
DoctorOhh is offline   Reply With Quote
Advert
Old 12-05-2011, 05:23 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: 43,853
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Libraries must be keyed by absolute paths, using relative paths is unsafe. Relative to what? And how do you ensure there are not duplicates. You can use the calibre-portable.bat file to control exactly which library calibre startswith. Search this forum for examples.
kovidgoyal is offline   Reply With Quote
Old 12-05-2011, 06:50 AM   #4
burbleburble
Connoisseur
burbleburble began at the beginning.
 
Posts: 52
Karma: 38
Join Date: Jun 2011
Device: Kindle 3
dwanthny:
Apologies. I just read the forum title 'Development' and assumed it was totally self explanatory.

kovidgoyal:
  1. 'using relative paths is unsafe': Excuse my ignorance, but why?
  2. 'Relative to what': To calibre's portable executable. Works for me, I do it all the time; but as stated, I get a very cluttered library menu. It keeps the reference by relative path, but creates a double reference by full path, thus I end up with 2+ menu options for accessing the same library.
  3. 'And how do you ensure there are not duplicates': Well, they're all starting from the same point, the calibre-portable executable. os.path does contain methods for checking if two paths are equivalent, even relative ones.
  4. 'You can use the calibre-portable.bat file...starts with': Thats part of the issue. 'starts with'. But lets say I maintain different libraries for different family members and their widely varied interests/ebook-devices. It is far easier to use different libraries than a mixture of tags and formats in one. So I need to switch between them.
burbleburble is offline   Reply With Quote
Old 12-05-2011, 10:13 AM   #5
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: 5,111
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Don't use the official calibre Portable download from http://www.calibre-ebook.com. Use the following instead:
http://portableapps.com/node/20518

Works wonderfully with multiple libraries. Just make sure your library folders are inside calibrePortable\Data to be safe/ensure portability.

Last edited by ilovejedd; 12-05-2011 at 10:15 AM.
ilovejedd is offline   Reply With Quote
Advert
Old 12-05-2011, 11:57 AM   #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,853
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Simple, suppose someone has one library at E:\library and another at C:\library and the calibre portable is at d:\calibre. Relative links will not work. Now you may well say that you would never do something like that, doesn't matter, there will exist someone who will.
kovidgoyal is offline   Reply With Quote
Old 12-05-2011, 12:13 PM   #7
burbleburble
Connoisseur
burbleburble began at the beginning.
 
Posts: 52
Karma: 38
Join Date: Jun 2011
Device: Kindle 3
ilovejedd:
Thanks for the idea, gonna look into it.


kovidgoyal:
Your'e quite correct in your example that relative links will not work. But, as a matter of fact, thats because they don't exist! (am I wrong? I'm somewhat new to this). So I don't understand how someone can write a relative path that doesn't exist, and thus find himself refering to two libraries! And if somehow there is a way to write paths relative to 'my computer', across multiple drive names without explicitly stating them, then don't allow a situation where relative paths cross drive names to be set as a library path. Will that also not work?
burbleburble is offline   Reply With Quote
Old 12-05-2011, 01:57 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: 43,853
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No, the relative links will not work because both relative links are the same, for different absolute paths. I can construct other examples like this for filesystems that support symbolic links, but I've spent enough time on this.
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to merge 2 Calibre Libraries? Tolkamp Library Management 17 03-27-2019 09:36 PM
Calibre Portable and Libraries atjnjk Related Tools 13 12-15-2010 06:16 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 08:14 AM.


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