diff options
author | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2021-01-03 12:25:15 +0100 |
---|---|---|
committer | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2021-01-03 12:25:15 +0100 |
commit | 1b51ac55d3863e2800d3eabddef7e861c49d5d62 (patch) | |
tree | b7ba58c3d123e3689a09114539f321c0a395fc18 | |
parent | ed352fe84d7a91aeb96c4048351d4be3793e6d61 (diff) |
New collection example: books
-rw-r--r-- | CHANGELOG.rst | 3 | ||||
-rw-r--r-- | docs/examples/books/README.txt | 5 | ||||
-rw-r--r-- | docs/examples/books/import/from_tellico.yaml | 40 | ||||
-rw-r--r-- | docs/examples/books/settings.yaml | 93 |
4 files changed, 141 insertions, 0 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c9c1129..35bb109 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,9 @@ Unreleased ========== +* New collection example: books. +* Fixes to the tellico2lesana script (python 2.9 compatibility). + 0.7.0 ===== diff --git a/docs/examples/books/README.txt b/docs/examples/books/README.txt new file mode 100644 index 0000000..377618e --- /dev/null +++ b/docs/examples/books/README.txt @@ -0,0 +1,5 @@ +This is an example lesana collection for books. + +The file ``import/from_tellico.yaml`` can be used with ``lesana export`` +from a book collection generated by ``tellico2lesana`` from a tellico 3.x +file. diff --git a/docs/examples/books/import/from_tellico.yaml b/docs/examples/books/import/from_tellico.yaml new file mode 100644 index 0000000..0446492 --- /dev/null +++ b/docs/examples/books/import/from_tellico.yaml @@ -0,0 +1,40 @@ +asd: '{{ comments }}' +title: '{{ title if title }}' +subtitle: '{ subtitle if subtitle }}' +authors: {% if authors %}{% for a in authors %} + - "{{ a }}"{% endfor %}{% else %}[]{% endif %} +editors: {% if editors %}{% for e in editors %} + - "{{ e }}"{% endfor %}{% else %}[]{% endif %} +binding: '{{ binding if binding}}' +purchase_date: '{{ pur_date if pur_date }}' +purchase_price: '{{ pur_price if pur_price }}' +publisher: '{{ publisher if publisher }}' +edition: '{{ edition if edition }}' +copyright_year: {% if cr_years %}{% for y in cr_years %} + - "{{ y }}"{% endfor %}{% else %}[]{% endif %} +publication_year: {{ pub_year if pub_year }} +isbn: '{{ isbn if isbn }}' +lccn: '{{ iccn if iccn }}' +pages: {{ pages if pages}} +translators: {% if translators %}{% for t in translators %} + - "{{ t }}"{% endfor %}{% else %}[]{% endif %} +languages: {% if languages %}{% for l in languages %} + - "{{ l }}"{% endfor %}{% else %}[]{% endif %} +genres: {% if genres %}{% for g in genres %} + - "{{ g }}"{% endfor %}{% else %}[]{% endif %} +keywords: {% if keywords %}{% for k in keywords %} + - "{{ k }}"{% endfor %}{% else %}[]{% endif %} +series: '{{ series if series}}' +series_number: {{ series_num if series_num }} +condition: '{{ condition if condition}}' +signed: {{ signed if signed}} +read: {{ read if read }} +gift: {{ gift if gift }} +loaned: {{ loaned if loaned }} +rating: {{ rating if rating }} +cover: {{ cover if cover }} +plot: | + {{ plot if plot else '.' | indent(width=2, first=False) }} +comments: | + {{ comments if comments else '.' | indent(width=2, first=False) }} + diff --git a/docs/examples/books/settings.yaml b/docs/examples/books/settings.yaml new file mode 100644 index 0000000..b4c531b --- /dev/null +++ b/docs/examples/books/settings.yaml @@ -0,0 +1,93 @@ +name: My Books +lang: english +entry_label: '{{ short_id }}: {{ authors | join("; ") }} - {{ title }}' +git: false +fields: +- name: title + type: string + index: free +- name: subtitle + type: string + index: free +- name: authors + type: list + list: string + index: free +- name: editors + type: list + list: string + index: free +- name: binding + type: string +- name: purchase_date + type: string + index: field +- name: purchase_price + type: string + index: field +- name: publisher + type: string + index: field +- name: edition + type: string +- name: copyright_year + type: list + list: integer + index: field +- name: publication_year + type: integer + index: field +- name: isbn + type: string + index: field +- name: lccn + type: string + index: field +- name: pages + type: integer +- name: translators + type: list + list: string +- name: languages + type: list + list: string + index: field +- name: genres + type: list + list: string + index: field +- name: keywords + type: list + list: string + index: field +- name: series + type: string + index: field +- name: series_number + type: integer +- name: condition + type: string + index: field +- name: signed + type: boolean + index: field +- name: read + type: boolean + index: field +- name: gift + type: boolean + index: field +- name: loaned + type: boolean + index: field +- name: rating + type: integer + index: field +- name: cover + type: file +- name: plot + type: text + index: field +- name: comments + type: text + index: field |