From f3a4612901b9e2ce6ad5ad501edfcc887b717587 Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Thu, 16 Sep 2021 14:16:25 +0200 Subject: Script to import book data from openlibrary --- .../examples/books/templates/from_openlibrary.yaml | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 docs/examples/books/templates/from_openlibrary.yaml (limited to 'docs') diff --git a/docs/examples/books/templates/from_openlibrary.yaml b/docs/examples/books/templates/from_openlibrary.yaml new file mode 100644 index 0000000..2fab669 --- /dev/null +++ b/docs/examples/books/templates/from_openlibrary.yaml @@ -0,0 +1,32 @@ +title: '{{ edition.title }}' +subtitle: '' +authors: {% if authors %}{% for a in authors %} +- {{ a.name }}{% endfor %}{% else %}[]{% endif %} +editors: [] +binding: '' +purchase_date: '' +purchase_price: '' +publisher: '{{ edition.publishers | join(", ") }}' +edition: '' +copyright_year: [] +publication_year: {{ pub_date.year }} +isbn: '{{ edition.isbn_13.0 }}' +lccn: '' +openlibrary: 'https://openlibrary.org{{ edition.key }}' +pages: {{ edition.number_of_pages }} +translators: [] +languages: {% if langs %}{% for l in langs %} +- {{ l }}{% endfor %}{% else %}[]{% endif %} +genres: [] +keywords: [] +series: '' +series_number: 0 +condition: '' +signed: +read: +gift: +loaned: +rating: 0 +cover: '' +plot: '' +comments: '' -- cgit v1.2.3