From f3648281afd2eaeafe63a66816ca53b2996f68de Mon Sep 17 00:00:00 2001 From: Mattias Svensson Date: Sun, 28 Jun 2026 14:18:15 +0200 Subject: [PATCH] book: add {author} (primary author) output template field as_dict only exposed {authors} (all authors joined with '; '), which scatters one author across folders when books credit co-authors. Add {author} (first author) so users can organize by primary author: -o "{author}/{title}.{ext}". Co-Authored-By: Claude Fable 5 --- grawlix/book.py | 1 + 1 file changed, 1 insertion(+) diff --git a/grawlix/book.py b/grawlix/book.py index 1fe6da6..bc5e288 100644 --- a/grawlix/book.py +++ b/grawlix/book.py @@ -25,6 +25,7 @@ class Metadata: "identifier": self.identifier or "UNKNOWN", "language": self.language or "UNKNOWN", "authors": "; ".join(self.authors), + "author": self.authors[0] if self.authors else "UNKNOWN", "description": self.description or "UNKNOWN", "release_date": self.release_date.isoformat() if self.release_date else "UNKNOWN", }