I hope this isn't a necro, but I was finally learning templates after 10 years of Calibre for specific this reason.
It's not only Windows that does this. I am using Calibre 7 on Arch linux. This happens to me. I use koreader on my kobo sage with top-level directories to sort my titles by #subject. Ideally, a simplified version would be like
/books/History/Some_Author-Some_Series-01-Some_title.epub
however, if that is very long (I use series so it can be), the path or file name is truncated. This isn't such a big deal when it happens to the filename because koreader shows the metadata title in the filemanager once I'm in that directory, but it may come out one of these random ways:
/books/Hstory
/boks/History
/books/History
It is totally random where they end up, which is kinda sketchy. Even stranger, two books with the same path/name length get truncated in different ways, dividing the bunch. I'd much rather a message telling me the transfer had failed than have the system make arbitrary decisions about where my files land.
It's not noticeable when using Nickel because all browsing is via the database. But sending 50 books on one subject to the e-reader might end up with the same subject scattered in different places. With koreader, this is no good.
I started using some send-to-device templates that mostly work. Since I really only need the top two levels to be 100% correct, I preemptively truncate the title myself like this:
books/{#shelf:||/}{author_sort:sublist(0,1,\,)}-{series:||-}{series_index:re(^(\d)(\.|$),0\1\2)||-}{title:'sublist(sublist($, 0, 1, ':'), 0, 10, '_')'}
This ensures no title shows at all beyond the subtitle separator ':' and the rare book that has a very long main title doesn't have more than 10 words, separated by '_'
It didn't seem to matter if I placed the Subject/Auth/Series/Title on the same line on the filename or as nested directories. It was always shortened.
I think this is more of a vfat bug than an os bug. I'm thinking of trying a regular rsync and see if the same happens. So far, I've only used Calibre for this experiment. ext4 might be a better fs option for those who have that choice, for a few reasons.
|