Keep the article in {title} and {series}

The default template is now {title_sort} - {authors}. It gives the same name as Calibre's default.
This commit is contained in:
tim
2026-10-03 08:09:41 +02:00
parent 42e7287389
commit dcdd8e4ac7
6 changed files with 36 additions and 24 deletions
+13 -9
View File
@@ -448,23 +448,27 @@ downloaded before.
## File names of downloaded books
"Download ePub" on a story page sends the book to your browser with a file name. A template gives
the name. The default template is `{title} - {authors}`, as in Calibre. For "The Book" by Ann
Writer, it gives `Book, The - Ann Writer.epub`.
the name. The default template is `{title_sort} - {authors}`. For "The Book" by Ann Writer, it gives
`Book, The - Ann Writer.epub`. That is the name that Calibre's default template gives.
An admin can change the template under "Book Downloads" in Settings. To go back to the default,
clear the field and save. The template follows
the rules of [Calibre's templates](https://manual.calibre-ebook.com/template_lang.html) for file
names, so a template from Calibre gives the same name in Bindery. Bindery adds `.epub`. For example,
`{series:|| - }{series_index:0>2s|| - }{title} - {authors}` gives
`Saga, The - 02 - Book, The - Ann Writer.epub`.
names. Bindery adds `.epub`. For example, `{series:|| - }{series_index:0>2s|| - }{title} - {authors}`
gives `The Saga - 02 - The Book - Ann Writer.epub`.
In Calibre, `{title}` and `{series}` give the title sort in a file name, for example `Book, The`.
In Bindery, they keep the article. This is the same as Calibre with the tweak
`save_template_title_series_sorting` set to `strictly_alphabetic`. Use `{title_sort}` for the title
with the article at the end.
| Field | Value |
| --- | --- |
| `{title}` | The title. A leading "The", "A" or "An" moves to the end, as in Calibre: `Book, The`. |
| `{title_sort}` | The same value as `{title}`. |
| `{title}` | The title: `The Book`. |
| `{title_sort}` | The title with a leading "The", "A" or "An" at the end: `Book, The`. |
| `{authors}`, `{author}` | The authors, with ` & ` between them. |
| `{author_sort}` | The authors with the last name first: `Writer, Ann`. |
| `{series}` | The series. A leading article moves to the end. |
| `{series}` | The series. |
| `{series_index}` | The series number: `2`, or `2.5`. |
| `{tags}` | The tags in sorted order, with `, ` between them. |
| `{languages}` | The language, as Bindery stores it. |
@@ -495,7 +499,7 @@ gives the day, `%b` the month name, `%m` the month number and `%Y` the year. The
`%b, %Y`, as in Calibre. It gives `May, 2020`. To go back to the default, clear the field and save.
A `/` in a date becomes `_`, as in Calibre.
Bindery follows Calibre 9.2.1 with its default tweaks, for English. The order of tags with letters
Bindery follows Calibre 9.2.1 for English, with the tweak above. The order of tags with letters
outside ASCII can differ from Calibre. The template applies only to downloads in the browser. It
does not change the names of the files in `INGEST_DIR`. The browser can ignore the name.