-
Notifications
You must be signed in to change notification settings - Fork 68
Naming Tokens
Bindery renames imported files using a template configured under Settings → General → Naming. The template is expanded with tokens from the book and author records at import time.
| Scope | Default template |
|---|---|
| Ebooks | {Author}/{Title} ({Year})/{Title} - {Author}.{ext} |
| Audiobooks | {Author}/{Title} ({Year}) |
Templates can contain directory separators (/). Each segment is sanitised independently, so path-unsafe characters in author or title values are replaced rather than leaked into the filesystem.
| Token | Value |
|---|---|
{Author} |
Primary author name as stored on the author record. Falls back to Unknown Author when unset. |
{SortAuthor} |
Author name in sort order (e.g. King, Stephen). Useful for library directory layouts that want last-name-first folders. |
{Title} |
Book title from the metadata record. |
{Year} |
Release year as a 4-digit string, or empty if not known. |
{Series} |
Name of the book's primary series (e.g. Mistborn). Expands to an empty string for books not in any series, causing the path segment to be omitted. |
{SeriesNumber} |
Position of the book within its primary series (e.g. 1, 3, 3.5). Empty string when the book has no series. |
{ASIN} |
Amazon Standard Identification Number from the book's metadata. Empty string if not set. |
{ext} |
Original file extension (without the leading dot): epub, mobi, m4b, etc. |
Tokens are case-sensitive — {Author} expands, {author} does not.
Readarr-style layout with year folders:
{Author}/{Title} ({Year})/{Title} - {Author}.{ext}
Sort-name folders (library browsable by surname):
{SortAuthor}/{Title} ({Year})/{Title}.{ext}
Series-organised layout — books in a series go into a series subfolder; standalone books land directly in the author folder:
{Author}/{Series}/{SeriesNumber} - {Title}.{ext}
When {Series} and {SeriesNumber} are both empty (no series), the path collapses to {Author}/{Title}.{ext} because empty path segments are stripped during sanitisation.
ASIN-indexed layout (useful for Audible-heavy libraries where the ASIN is the stable identifier):
{Author}/{ASIN}/{Title}.{ext}
Each expanded token has the following characters replaced with _ before being spliced into the template: /, \, :, *, ?, ", <, >, |. Leading and trailing whitespace and dots are trimmed from each path segment. This keeps paths portable across Linux, macOS, and Windows-backed volumes without needing per-OS template variants.
Empty tokens (e.g. {Series} for a book not in a series) result in an empty path segment, which is silently stripped. A template like {Author}/{Series}/{Title}.{ext} therefore produces Author/Title.epub rather than Author//Title.epub for books with no series data.
During Settings → General → Library → Scan Library, Bindery matches files to book records using a four-tier strategy:
-
ASIN — the 10-character
B0XXXXXXXXpattern in the filename is looked up against stored ASINs. -
Title + author — parsed from the filename using the separator patterns (
Title - Author,Title by Author). -
Series name + position — if the filename contains a series annotation such as
[Mistborn, Book 1],(Dune Chronicles #2), or(Wheel of Time, Vol. 3), Bindery looks up the series in the database and matches the book at that position. Returns no match when the result is ambiguous (more than one book at that position across multiple series with the same name). - Fuzzy title — Jaro-Winkler similarity match as a final fallback.
The scanner recognises annotations in brackets or parentheses, with or without book, vol, volume, or part keywords:
| Example | Series | Position |
|---|---|---|
[Mistborn, Book 1] |
Mistborn | 1 |
(Dune Chronicles #2) |
Dune Chronicles | 2 |
(Wheel of Time, Vol. 3) |
Wheel of Time | 3 |
(The Stormlight Archive, Part 4.5) |
The Stormlight Archive | 4.5 |
ISBN-shaped numbers (starting with 978 or 979) are excluded from series matching even if they appear in brackets.
Getting started
Setup guides
How-to guides — proxy auth (v1.0)
How-to guides — OIDC (v1.0)
- Google Sign-In
- GitHub OAuth via Dex
- Authelia as OIDC provider
- Authentik
- Keycloak
- Rotate OIDC client secrets
- Recover from broken OIDC
How-to guides — multi-user (v1.0)
Reference
Contributing