$def with (list, editions, works, authors)
$list.name - Editions
$def render_authors(book):
$if book.works:
$ authors = book.works[0].get_authors()
$else:
$ authors = book.get_authors()
$if authors:
$for a in authors:
$a.name$cond(not loop.last, ", ")
$else:
Unknown authors
$for book in editions:
-
by $:render_authors(book)
$if book.publishers and book.publish_date:
$book.publish_date, $(', '.join(book.publishers))
$elif book.first_publish_date:
$book.publish_date
$elif book.publishers:
Publish date unknown, $(', '.join(book.publishers))
$else:
Publisher unknown
$for author in authors:
-
$if author.birth_date:
( $author.birth_date
$else:
( -
$if author.death_date:
- $author.death_date )
$else:
)