View Single Post
Old 01-25-2024, 03:09 PM   #15
nixR3ad
Enthusiast
nixR3ad began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Jan 2024
Device: Sage / rm2
if anyone does need a method to avoid random vfat truncation of top-level directories, here is my send-to-device template. It sends to a "books" directory, then the #shelf.

The rest is a single filename (no author, series dirs) so that koreader will just show the metadata in the #shelf directory. The author is shortened, and the "title" part ensures the filenames don't include subtitles, and any main titles longer than 10 words get shortened to 10, preserving the '/books/#shelf' part of the path.

This wasn't mine, as I'm new to the template language, but I did hack it together from various examples I'd found in this forum.
Code:
books/{#shelf:||/}{author_sort:sublist(0,1,\,)}-{series:||-}{series_index:re(^(\d)(\.|$),0\1\2)||-}{title:'sublist(sublist($, 0, 1, ':'), 0, 10, '_')'}
nixR3ad is offline   Reply With Quote