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?