03-06-2017, 06:15 PM | #1 |
Addict
Posts: 225
Karma: 15318
Join Date: Nov 2015
Device: Kobo Glo HD
|
Environment variable for libraries?
Is there any way to have an environment variable as part of a library path?
I tried doing this manually and Calibre opens the library all right but then saves the path with the variable replaced by its text. Thanks, Steve |
03-06-2017, 07:20 PM | #2 | |
null operator (he/him)
Posts: 20,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Otherwise, you could delete the existing symlink and create a new symlink referring to a different target with the same symlink name as the one you just deleted. Or use file rename to shuffle between predefined symlinks. But - why do you want something like this, calibre can access multiple libraries easy enough. BR Last edited by BetterRed; 03-06-2017 at 07:48 PM. |
|
03-06-2017, 07:27 PM | #3 |
Addict
Posts: 225
Karma: 15318
Join Date: Nov 2015
Device: Kobo Glo HD
|
I want to use %onedrive%
I access my libraries in the cloud from 3 or 4 pcs and in every pc the %onedrive% is different, so i always have to reselect the library path It's no big deal just an irritation I can use %onedrive% for the config but not for the libraries |
03-06-2017, 07:53 PM | #4 | |
Wizard
Posts: 2,082
Karma: 8796704
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
|
Quote:
I am getting errors with my calibre library on a networked drive/NAS? bernie |
|
03-06-2017, 08:42 PM | #5 |
Addict
Posts: 225
Karma: 15318
Join Date: Nov 2015
Device: Kobo Glo HD
|
Bernie im not getting any errors it works just fine!!!
|
03-06-2017, 09:01 PM | #6 | |
null operator (he/him)
Posts: 20,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
You could run into problems if you were updating the same library from multiple PC's concurrently. BR |
|
03-06-2017, 10:56 PM | #7 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Just a create a custom calibre shortcut on each pc that runs calibre with
calibre.exe --with-library %onedrive%\whatever |
03-07-2017, 08:32 AM | #8 |
Addict
Posts: 225
Karma: 15318
Join Date: Nov 2015
Device: Kobo Glo HD
|
Kovid
Works great! Might still be nice to have this work one day "inside calibre" but this works just fine for now. Thank you. Steve |
03-07-2017, 08:34 AM | #9 |
Addict
Posts: 225
Karma: 15318
Join Date: Nov 2015
Device: Kobo Glo HD
|
Ps if there are version conflicts onedrive creates files suffixed by the pc name.
This can happen obviously. |
03-07-2017, 10:06 AM | #10 | |
Well trained by Cats
Posts: 29,801
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Why is it so hard to understand there are limits to any design? With Calibre, changing the filename in ANY way causes a mismatch with the DB. This was/is the problem with GoogleDrive. It is not an issue of IF (it will), but WHEN (pick a time where you don't have time to recover ). |
|
03-07-2017, 11:07 AM | #11 |
Addict
Posts: 225
Karma: 15318
Join Date: Nov 2015
Device: Kobo Glo HD
|
@theducks
I have been using this fine for a couple of months. Honestly, you are making problems where they dont exist. You would not break the link in this situation, because there is one copy of the file with the latest timestamp and another backup copy with the pcname suffix, so you have the decision to use this one. I have never had a problem with any epub file (but of course this can happen) but i do frequently get multiple copies of files in the config library. This is when I start a pc and go into calibre quickly before ondrive had a chance to do its thing. I get standard settings and all the same plugins and libraries wherever I am so I can also plug in my kobo and go, for example. If i update the kobo utils plugin it's updated everywhere, my laptop, my desktops in uk and germany, etc. Obviously it equires a very small modicum of care but honestly it works so well and easy I dontknow why several people just seem to like to criticise Last edited by Stevex; 03-07-2017 at 11:10 AM. |
03-07-2017, 12:02 PM | #12 | |
Well trained by Cats
Posts: 29,801
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
The DB stores the path eg Code:
"C:\Users\ME\MainLib\Alex P. Berg\Red Hot Steele (13011)\Red Hot Steele - Alex P. Berg.azw3"
if any part of that changes (OUTSIDE OF CALIBRE), the linkage is broken If the second PC has a different path to the cloud, the DB now has the wrong path for any other PC Shadow a Library is fine. Accessing directly is FRAGILE or Can make it BROKEN We don't make recommendations that cause either . |
|
03-07-2017, 07:50 PM | #13 |
Addict
Posts: 225
Karma: 15318
Join Date: Nov 2015
Device: Kobo Glo HD
|
Fair enough
Obviously its caveat emptor and i do keep local offline backups But anyway: Onedrive doesnt change any of that It just prefixe the local path c:\users\username\onedrive\... or suchlike depending on os It wont mess anything else If you change a local file before the cloud version is synced it lets you know and makes the mentioned backup and sends a notification Last edited by Stevex; 03-07-2017 at 07:53 PM. |
03-11-2017, 06:08 AM | #14 |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Why give a lesson on Google drive when the poster is using One drive?
|
03-11-2017, 10:06 AM | #15 |
Well trained by Cats
Posts: 29,801
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CALIBRE_CONFIG_DIRECTORY Environment variable | huotg01 | Calibre | 15 | 11-14-2013 12:09 PM |
Using Class Variable in Def | Agama | Development | 1 | 08-21-2012 07:05 AM |
Variable payments come to eBooks | WhichP | News | 4 | 08-04-2012 03:52 PM |
PATH variable in Windows | kapsi | Calibre | 3 | 05-16-2011 05:12 PM |