Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 06-21-2015, 06:50 AM   #1
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,740
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
CC and file naming

One question that has arisen during the CC Cloud alpha test pertains to file names used to store books. The same question has arisen many times before, most recently in this thread.

Summarizing the current situation:
  • When using the wireless connection, calibre computes the name using the template in the wireless driver.
  • When using the content server, one of CC or calibre computes the name depending on several factors. If calibre computes the name (a current CC option) then it will most likely be done using the template in the wireless driver, but there is no guarantee of that.
  • For CC Cloud, CC computes the name.
Having both CC and calibre compute the name can lead to a book having different file names on different devices thereby breaking book position syncing, or even in some cases to having the same book more than one time on a single device.

I am considering adding an option to CC and making the necessary changes to calibre so CC would be in charge of file names. For the wireless connection, CC would pass back the correct name to calibre. For the other two, CC would generate the name.

Making this work would entail adding a limited template processor to CC, supporting basic template mode with the following columns:
  • {series}
  • {series_index}
  • {authors}
  • {author_sort}
  • {first_author} (what in calibre would be {authors:sublist(0,1,&)}
  • {title} (the real title complete with leading articles)
  • {title_sort}
  • {#some_text_type_custom_column}
  • the prefix and suffix stuff, e.g., templates like {column:|text|text}.
There would be no template functions. The format qualifier (e.g., >2s) would not be supported. Composite columns (columns built from other columns) could not be used.

For example, you could specify in CC a template like the following:
Code:
{first_author}/{title_sort} {series:| - |}
This template would be used to generate file names for all connection types.

The question: would anyone use this?

Last edited by chaley; 06-21-2015 at 04:29 PM. Reason: Remove {id} as it isn't always available
chaley is offline   Reply With Quote
Old 06-21-2015, 10:41 AM   #2
PatNY
Zennist
PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.
 
PatNY's Avatar
 
Posts: 1,022
Karma: 47809468
Join Date: Jul 2010
Device: iPod Touch, Sony PRS-350, Nook HD+ & HD
Hi Charles ...

Yes, definitely! I would use that option on all devices. Especially since "there is no guarantee" of file naming consistency with books imported via the content server.

I use the content server maybe about 40% of the time; wireless the rest. In addition, as mentioned in the other thread, I had "Use calibre's file names" checked on two devices, but not on a third. So the file names didn't always match up -- and I was wondering "What's wrong with Moon Reader's sync?"

I suspect I am not the only CC/Moon Reader customer who has found issues syncing due to inconsistent file names. And I would think many others have no clue what the cause is. Unfortunately, there is not much information on Moon Reader's website about troubleshooting sync issues OR how to ensure successful syncing.

If you do this, it might be very helpful to include some short information why identical file names are critical to correct book syncing. Some probably assume incorrectly like I did that if two books have the same exact metadata titles and author, they would match up fine.

--Pat
PatNY is offline   Reply With Quote
Advert
Old 06-21-2015, 11:44 AM   #3
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
So long as it is an option and not the default.

bernie
gbm is offline   Reply With Quote
Old 06-21-2015, 11:51 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,740
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by gbm View Post
So long as it is an option and not the default.

bernie
The defaults would stay exactly as they are: calibre names for wireless device connections and CC names (no template) for content server & cloud connections. A user will need to be proactive, changing an option and entering a template, to use CC templates. It will be a third checkbox in the File Names settings section. Checking any one will disable the other two.

Templates would be entered using a Book Details menu item. It is there to ensure a is book available to test the templates to verify what is generated using live data.
chaley is offline   Reply With Quote
Old 06-21-2015, 11:59 AM   #5
Purple Lady
Grand Sorcerer
Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.
 
Purple Lady's Avatar
 
Posts: 5,698
Karma: 16542228
Join Date: Feb 2010
Location: Pennsylvania
Device: Huawei MediaPad M5, LG V30, Boyue T80S, Nexus 7 LTE, K3 3G, Fire HD8
Quote:
Originally Posted by PatNY View Post
Hi Charles ...

Yes, definitely! I would use that option on all devices. Especially since "there is no guarantee" of file naming consistency with books imported via the content server.

I use the content server maybe about 40% of the time; wireless the rest. In addition, as mentioned in the other thread, I had "Use calibre's file names" checked on two devices, but not on a third. So the file names didn't always match up -- and I was wondering "What's wrong with Moon Reader's sync?"

I suspect I am not the only CC/Moon Reader customer who has found issues syncing due to inconsistent file names. And I would think many others have no clue what the cause is. Unfortunately, there is not much information on Moon Reader's website about troubleshooting sync issues OR how to ensure successful syncing.

If you do this, it might be very helpful to include some short information why identical file names are critical to correct book syncing. Some probably assume incorrectly like I did that if two books have the same exact metadata titles and author, they would match up fine.

--Pat
I would use this as well. I think you are correct that there are others that cannot get Moon+ to work because of inconsistent naming. It took me a while to figure out it was because of the names being different. I thought it was a problem in Moon+ for a long time.
Purple Lady is offline   Reply With Quote
Advert
Old 06-21-2015, 02:12 PM   #6
Thomas_AR
Zealot
Thomas_AR began at the beginning.
 
Thomas_AR's Avatar
 
Posts: 131
Karma: 10
Join Date: Jan 2015
Location: Buenos Aires
Device: Android
I would 100% use this function. I do not use the content server, only wireless connection to push books to device and sync metadatas.

Last edited by Thomas_AR; 06-21-2015 at 02:26 PM.
Thomas_AR is offline   Reply With Quote
Old 06-23-2015, 11:07 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,740
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
I have added the template stuff. It is in the current alpha, although there are a few changes waiting until the next release.

I rewrote the FAQ answer
How do I get the same file name for books when using wireless device, content server, & cloud connections

There are two new FAQ answers:
Problems with syncing read positions in reader apps like Moon+
I added a new "Help Dialog" to reader selection that offers a link to this answer.

What can I use in a CC file name template?
The CC template tester has a button that opens this answer.

Last edited by chaley; 06-23-2015 at 04:25 PM.
chaley is offline   Reply With Quote
Old 06-23-2015, 02:57 PM   #8
Purple Lady
Grand Sorcerer
Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.
 
Purple Lady's Avatar
 
Posts: 5,698
Karma: 16542228
Join Date: Feb 2010
Location: Pennsylvania
Device: Huawei MediaPad M5, LG V30, Boyue T80S, Nexus 7 LTE, K3 3G, Fire HD8
Quote:
Originally Posted by chaley View Post
I have added the template stuff. It is in the current alpha, although there are a few changes waiting until the next release.

I rewrote the FAQ answer
How do I get the same file name for books when using wireless device, content server, & cloud connections

There are two new FAQ answers:
Problems with syncing read positions in reader apps like Moon+
I added a new "Help Dialog" to reader selection that offers a link to this answer.

What can I use in a CC file name template?
The CC template tester has a button that opens this answer.
The last link is not working. Probably because it's "http://What can I use in a CC file name template?"
Purple Lady is offline   Reply With Quote
Old 06-23-2015, 04:25 PM   #9
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,740
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Purple Lady View Post
The last link is not working. Probably because it's "http://What can I use in a CC file name template?"
Fixed.
chaley is offline   Reply With Quote
Old 06-23-2015, 08:52 PM   #10
Purple Lady
Grand Sorcerer
Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.
 
Purple Lady's Avatar
 
Posts: 5,698
Karma: 16542228
Join Date: Feb 2010
Location: Pennsylvania
Device: Huawei MediaPad M5, LG V30, Boyue T80S, Nexus 7 LTE, K3 3G, Fire HD8
Quote:
Originally Posted by chaley View Post
One question that has arisen during the CC Cloud alpha test pertains to file names used to store books. The same question has arisen many times before, most recently in this thread.

Summarizing the current situation:
  • When using the wireless connection, calibre computes the name using the template in the wireless driver.
  • When using the content server, one of CC or calibre computes the name depending on several factors. If calibre computes the name (a current CC option) then it will most likely be done using the template in the wireless driver, but there is no guarantee of that.
  • For CC Cloud, CC computes the name.
Having both CC and calibre compute the name can lead to a book having different file names on different devices thereby breaking book position syncing, or even in some cases to having the same book more than one time on a single device.

I am considering adding an option to CC and making the necessary changes to calibre so CC would be in charge of file names. For the wireless connection, CC would pass back the correct name to calibre. For the other two, CC would generate the name.

Making this work would entail adding a limited template processor to CC, supporting basic template mode with the following columns:
  • {series}
  • {series_index}
  • {authors}
  • {author_sort}
  • {first_author} (what in calibre would be {authors:sublist(0,1,&)}
  • {title} (the real title complete with leading articles)
  • {title_sort}
  • {#some_text_type_custom_column}
  • the prefix and suffix stuff, e.g., templates like {column:|text|text}.
There would be no template functions. The format qualifier (e.g., >2s) would not be supported. Composite columns (columns built from other columns) could not be used.

For example, you could specify in CC a template like the following:
Code:
{first_author}/{title_sort} {series:| - |}
This template would be used to generate file names for all connection types.

The question: would anyone use this?
Can you do two different for first_author? I use both author and author sort in this fashion. Here's my current save template:
{#genre}/{author_sort:list_item(0,&)}/{title} - {author:list_item(0,&)}
Purple Lady is offline   Reply With Quote
Old 06-24-2015, 07:19 AM   #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,740
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Purple Lady View Post
Can you do two different for first_author? I use both author and author sort in this fashion. Here's my current save template:
{#genre}/{author_sort:list_item(0,&)}/{title} - {author:list_item(0,&)}
Done. I added {first_author_sort}.
chaley is offline   Reply With Quote
Old 06-24-2015, 10:15 AM   #12
Purple Lady
Grand Sorcerer
Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.
 
Purple Lady's Avatar
 
Posts: 5,698
Karma: 16542228
Join Date: Feb 2010
Location: Pennsylvania
Device: Huawei MediaPad M5, LG V30, Boyue T80S, Nexus 7 LTE, K3 3G, Fire HD8
Quote:
Originally Posted by chaley View Post
Done. I added {first_author_sort}.
Thanks!
Purple Lady is offline   Reply With Quote
Old 06-26-2015, 02:11 PM   #13
Purple Lady
Grand Sorcerer
Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.
 
Purple Lady's Avatar
 
Posts: 5,698
Karma: 16542228
Join Date: Feb 2010
Location: Pennsylvania
Device: Huawei MediaPad M5, LG V30, Boyue T80S, Nexus 7 LTE, K3 3G, Fire HD8
I am having trouble using the filename template. #genre is a custom column of type 'Text, column shown in the tag browser'. Shouldn't that be a valid column type?

First_author_sort is not shown as a valid column in your list.

Also, I was allowed to save an invalid template - was that intentional?

Click image for larger version

Name:	uploadfromtaptalk1435342149413.jpg
Views:	236
Size:	260.8 KB
ID:	139678
Purple Lady is offline   Reply With Quote
Old 06-26-2015, 02:16 PM   #14
Purple Lady
Grand Sorcerer
Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.
 
Purple Lady's Avatar
 
Posts: 5,698
Karma: 16542228
Join Date: Feb 2010
Location: Pennsylvania
Device: Huawei MediaPad M5, LG V30, Boyue T80S, Nexus 7 LTE, K3 3G, Fire HD8
Here is the filename created with my invalid template.
Click image for larger version

Name:	uploadfromtaptalk1435342662633.jpg
Views:	256
Size:	178.7 KB
ID:	139681
Purple Lady is offline   Reply With Quote
Old 06-26-2015, 02:42 PM   #15
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,740
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Purple Lady View Post
I am having trouble using the filename template. #genre is a custom column of type 'Text, column shown in the tag browser'. Shouldn't that be a valid column type?
It works fine for me. Are you sure that #genre is the type you said? For example, it won't work if it is a column built from other columns.
Quote:
First_author_sort is not shown as a valid column in your list.
Fixed.
Quote:
Also, I was allowed to save an invalid template - was that intentional?
I figured that if the user wanted to save it then perhaps s/he was going to come back later. I didn't want to create a situation where one *must* finish in order to go have dinner.
Quote:
Originally Posted by Purple Lady View Post
Here is the filename created with my invalid template.
Could you send me the metadata_db_prefs_backup.json from your library? That will tell me the exact column configuration.
chaley is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What's the best file naming convention for CC? PatNY Calibre Companion 8 06-21-2015 06:51 AM
File Naming on Nook STR Pinecone Devices 4 02-26-2014 05:51 PM
PRS-500 File Naming Convention agarner Sony Reader 5 01-06-2012 11:36 AM
File naming on Kindle tomsem Calibre 2 09-15-2010 01:05 AM
File naming strangeness HarryT iRex 2 06-05-2009 11:39 AM


All times are GMT -4. The time now is 12:04 AM.


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