Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-06-2017, 06:15 PM   #1
Stevex
Addict
Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.
 
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
Stevex is offline   Reply With Quote
Old 03-06-2017, 07:20 PM   #2
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Stevex View Post
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.
@Stevex - on Windows you could use a symlink and change its target as and when needed. The only way I know how to change a symlink's target directly is with Hermann Shinagl's Link Shell Extension (LSE), I don't think it can be done from the command line.

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.
BetterRed is offline   Reply With Quote
Advert
Old 03-06-2017, 07:27 PM   #3
Stevex
Addict
Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.
 
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
Stevex is offline   Reply With Quote
Old 03-06-2017, 07:53 PM   #4
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,082
Karma: 8796704
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
Quote:
Originally Posted by Stevex View Post
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
Have you read the FAQ's?

I am getting errors with my calibre library on a networked drive/NAS?

bernie
gbm is offline   Reply With Quote
Old 03-06-2017, 08:42 PM   #5
Stevex
Addict
Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.
 
Posts: 225
Karma: 15318
Join Date: Nov 2015
Device: Kobo Glo HD
Bernie im not getting any errors it works just fine!!!
Stevex is offline   Reply With Quote
Advert
Old 03-06-2017, 09:01 PM   #6
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Stevex View Post
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
Understood - fyi, I tweaked the thread title from library to libraries, it could be germane to an EnvVar solution.

Quote:
Originally Posted by Stevex View Post
Bernie im not getting any errors it works just fine!!!
You could run into problems if you were updating the same library from multiple PC's concurrently.

BR
BetterRed is offline   Reply With Quote
Old 03-06-2017, 10:56 PM   #7
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,856
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
kovidgoyal is offline   Reply With Quote
Old 03-07-2017, 08:32 AM   #8
Stevex
Addict
Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.
 
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
Stevex is offline   Reply With Quote
Old 03-07-2017, 08:34 AM   #9
Stevex
Addict
Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.
 
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.
Stevex is offline   Reply With Quote
Old 03-07-2017, 10:06 AM   #10
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,800
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:
Originally Posted by Stevex View Post
Ps if there are version conflicts onedrive creates files suffixed by the pc name.
This can happen obviously.
and that alone will break the link between Calibre and the file

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 ).
theducks is offline   Reply With Quote
Old 03-07-2017, 11:07 AM   #11
Stevex
Addict
Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.
 
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.
Stevex is offline   Reply With Quote
Old 03-07-2017, 12:02 PM   #12
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,800
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:
Originally Posted by Stevex View Post
@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
The word is WARN not criticize.
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"
The colored part is what Google Drive confuses because Calibre uses that as an INDEX
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 .
theducks is offline   Reply With Quote
Old 03-07-2017, 07:50 PM   #13
Stevex
Addict
Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.
 
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.
Stevex is offline   Reply With Quote
Old 03-11-2017, 06:08 AM   #14
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 theducks View Post
Code:
"C:\Users\ME\MainLib\Alex P. Berg\Red Hot Steele (13011)\Red Hot Steele - Alex P. Berg.azw3"
The colored part is what Google Drive confuses because Calibre uses that as an INDEX
if any part of that changes (OUTSIDE OF CALIBRE), the linkage is broken
Why give a lesson on Google drive when the poster is using One drive?
DoctorOhh is offline   Reply With Quote
Old 03-11-2017, 10:06 AM   #15
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,800
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:
Originally Posted by DoctorOhh View Post
Why give a lesson on Google drive when the poster is using One drive?
Because he started out with GD and may have edited his last post?
theducks is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 08:18 PM.


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