Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Devices

Notices

Reply
 
Thread Tools Search this Thread
Old 12-19-2017, 09:51 AM   #1
FauDrei
Junior Member
FauDrei began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Dec 2017
Device: Kobo Glo HD
Mirror Calibre library path structure to device

Regards.

What would be the exact save to device template that would create identically named sub-directories and file-names on the device as their "original" sub-directories and file-names in Calibre Library?

For example... a book from Calibre Library:
Code:
<Calibre Library Path>\Albert Camus\The Stranger (28)\The Stranger - Albert Camus.epub
...to be sent on device into:
Code:
<Device Library Path>\Albert Camus\The Stranger (28)\The Stranger - Albert Camus.epub
Thanks in advance for help.
FauDrei is offline   Reply With Quote
Old 12-19-2017, 10:06 AM   #2
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,977
Karma: 56143930
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
most is obvious because they are visible fields:
Code:
 ({id})
is the less than obvious piece
theducks is online now   Reply With Quote
Advert
Old 12-19-2017, 10:21 AM   #3
FauDrei
Junior Member
FauDrei began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Dec 2017
Device: Kobo Glo HD
Thanks, I also got to this...

Code:
{author}/{title} ({id})/{title} - {author}
But this does not work in case of multiple authors and/or very long titles...
FauDrei is offline   Reply With Quote
Old 12-19-2017, 10:44 AM   #4
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,977
Karma: 56143930
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 FauDrei View Post
Thanks, I also got to this...

Code:
{author}/{title} ({id})/{title} - {author}
But this does not work in case of multiple authors and/or very long titles...
Calibre truncates names to maintain path limits (of the poorest OS)
theducks is online now   Reply With Quote
Old 12-19-2017, 04:24 PM   #5
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,681
Karma: 26966376
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by theducks View Post
Calibre truncates names to maintain path limits (of the poorest OS)
And it 'ascii-izes' the names - i.e. the author folder for iʁɛn nemiʁɔfski will be iRen nemiRofski irrespective of language settings in the OS, calibre, or book. Latin author names and book titles that have accents, umlauts and such, will be similarly transformed.

And Kovid has been known to change the algorithm calibre uses to determine library folder and file names.

BR
BetterRed is online now   Reply With Quote
Advert
Old 12-20-2017, 02:38 AM   #6
FauDrei
Junior Member
FauDrei began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Dec 2017
Device: Kobo Glo HD
Thank you guys...

If I've understood your input correctly - folder and file names in Calibre library are (more or less) non-deterministic and there is no elegant way of having exactly the same folder/file structure on your device?

What about some advanced use of formats_paths() and select() functions? I am not that "proficient" in Calibre's template language but I suspect some winded clauses of similar functions could potentially solve my problem.
FauDrei is offline   Reply With Quote
Old 12-20-2017, 07:33 AM   #7
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,681
Karma: 26966376
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@FauDrei - why do you want to do this?

The names of sub-folders and files in a calibre library are arbitrary, they could have been created from row ids in the sqlite authors and books tables.

If you really need the same structure on your devices you could try to find a file sync tool that runs on your computer and devices- have a look in Comparison of file synchronization software - Wikipedia.

Since 2008 I've used Goodsync, if I was making the same decision today I would want to consider Resilio.

BR
BetterRed is online now   Reply With Quote
Old 12-20-2017, 09:56 AM   #8
FauDrei
Junior Member
FauDrei began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Dec 2017
Device: Kobo Glo HD
Hi BR, thanks for your suggestions. Having GLO HD e-reader structures in sync with my "main" Calibre PC was my goal.

For 20+ years I have been using Total Commander for synchronising folders and files (as well as for many other PC related tasks), but I wanted to spare myself a step or two at each e-book transfer from Calibre to my Glo HD. After all I've read/learned in past few days - I am not so sure this goal would be easy to maintain.

Thanks anyway.
FauDrei is offline   Reply With Quote
Old 12-20-2017, 10:03 AM   #9
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,283
Karma: 11806357
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by FauDrei View Post
Hi BR, thanks for your suggestions. Having GLO HD e-reader structures in sync with my "main" Calibre PC was my goal.

For 20+ years I have been using Total Commander for synchronising folders and files (as well as for many other PC related tasks), but I wanted to spare myself a step or two at each e-book transfer from Calibre to my Glo HD. After all I've read/learned in past few days - I am not so sure this goal would be easy to maintain.

Thanks anyway.
Out of curiosity, why do you want this synchronization? Which is the advantage you expect to get?
Terisa de morgan is offline   Reply With Quote
Old 12-20-2017, 11:49 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,977
Karma: 56143930
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 FauDrei View Post
Hi BR, thanks for your suggestions. Having GLO HD e-reader structures in sync with my "main" Calibre PC was my goal.

For 20+ years I have been using Total Commander for synchronising folders and files (as well as for many other PC related tasks), but I wanted to spare myself a step or two at each e-book transfer from Calibre to my Glo HD. After all I've read/learned in past few days - I am not so sure this goal would be easy to maintain.

Thanks anyway.
Believe me Including (ID) is a bad idea. Did that a long time ago.

The first time you use 2 Libraries (anyone's) , those numbers become meaningless. There are also other functions that Calibre will change that assignment.

Calibre companion will sync content and metadata (when using Wireless device connection) . Available for Android and IOS
theducks is online now   Reply With Quote
Old 12-20-2017, 12:10 PM   #11
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,788
Karma: 7029971
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by theducks View Post
Believe me Including (ID) is a bad idea. Did that a long time ago.
I have a CC user who reported a problem to me. He kept sending a set of books but only one of them was in CC's library. Checking debug logs I found that he had 6 different books with identical title and author. He was using a CC name template without {id} so all 6 books became the same book. The last book sent won.

Long way of saying that there are times when {id} or perhaps {uuid} is needed.
chaley is offline   Reply With Quote
Old 12-20-2017, 01:03 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,977
Karma: 56143930
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
[QUOTE=chaley;3628912
Long way of saying that there are times when {id} or perhaps {uuid} is needed.[/QUOTE]

Now uuid make sense. It should not change, right?
theducks is online now   Reply With Quote
Old 12-20-2017, 02:37 PM   #13
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,788
Karma: 7029971
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by theducks View Post
Now uuid make sense. It should not change, right?
The UUID will not change in a single library, but it will change if you copy the book to another library.
chaley is offline   Reply With Quote
Old 12-20-2017, 03:17 PM   #14
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,681
Karma: 26966376
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by FauDrei View Post
After all I've read/learned in past few days - I am not so sure this goal would be easy to maintain.
Sure wouldn't be, as others have made clear. And you would be targeting another can of worms - the operating and file systems used on the Kobo, which I would regard as proprietary to Rakuten.

The key issue is that calibre is not a file system centric application, it's a database centric application. The author and book sub-folders exist for efficiency reasons; they avoid having to use blobs for format files, they provide storage for readily displayable cover images, and a place to store database recovery data.

As an experiment try this:
  • stop calibre;
  • take a copy of a calibre library folder e.g. MyLibrary to TestLibrary;
  • delete all the author sub-folders from TestLibrary;
  • start calibre and use the Library->Switch/create library... tool to access TestLibrary.
The book list should look familiar, however the book details panel (right sidebar) won't have any covers or format files.

BR
BetterRed is online now   Reply With Quote
Old 12-20-2017, 06:03 PM   #15
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,906
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by FauDrei View Post
Hi BR, thanks for your suggestions. Having GLO HD e-reader structures in sync with my "main" Calibre PC was my goal.

For 20+ years I have been using Total Commander for synchronising folders and files (as well as for many other PC related tasks), but I wanted to spare myself a step or two at each e-book transfer from Calibre to my Glo HD. After all I've read/learned in past few days - I am not so sure this goal would be easy to maintain.
I can't think of a single real benefit for doing this. About the only advantage might be automatically syncing the structures without starting calibre. But, you lose the benefits of calibre and the drivers for sending the books to the device.

For example, calibre doesn't automatically update the metadata in the books. This is stored in a database and only when the book is sent outside calibre (plus some other actions) is the metadata updated. If you sync the file structure, the books on the device are unlikely to have the latest metadata.

Another thing is the device. I link the think the calibre support for the Kobo devices is very good. The driver can create collections, set the series information, tweak some styles, generate the cover images and some other things when you send the book. Plus, it has an important cheat. The default behaviour of the Kobo device if a book is replaced is to remove it from the internal database and process it as a new book. This means you lose the collections and reading status. The driver fiddles with the database a bit to prevent this from happening. This isn't perfect, but I find it much more useful than the device treating the book as a new book.
davidfor is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Library structure on PC and on Device mfsav2 Library Management 7 12-17-2015 09:22 PM
T68 - Calibre and folder structure on the device Brandobras Onyx Boox 6 09-02-2014 03:20 AM
Easiest way to mirror/sync library with Android device? Mivo Calibre 6 10-02-2013 05:07 AM
Change path to Calibre library davidm_uk Library Management 3 02-07-2012 06:14 AM
[old thread] filename and library structure /author and titel structure tscamera Library Management 4 05-31-2011 05:44 PM


All times are GMT -4. The time now is 06:56 PM.


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