Generates a tag based folder structure for exporting books to disc in the Calibre E-Book Manager.
Path structure will look like this:
Tag/Author/Series (3) - Title/Author - Title.epub
- In Calibre open the template editor in
Preferences
>Saving books to disc
>Template Editor
- Paste the contents of the
template.py
and save - Select the books you want to export and press
Save to Disc
- Done!
First tag in the book's tag list will be used
tags = sublist(raw_list("tags", ","), 0, 1, ",");
List of authors, seperated by comma up to 2 authors
author = sublist(raw_list('authors', ", "), 0, 2, ", ");
Series will be listed if it exist, otherwise title of the book will be shown
series = strcat(field("series"), " (", field("series_index"), ") - ");
Full title will be shown if it's less than 50 characters long, otherwise it's trimmed down
title_trim = strcat(substr(title, 0, 50), " […]");
title = cmp(strlen(title), 50, title, title, title_trim);