From 3682ac4cb420361634b624d014133b54d6015394 Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Sun, 15 Sep 2019 17:40:41 +0200 Subject: Added an example collection --- docs/examples/music/README.txt | 4 +++ docs/examples/music/import/from_tellico.yaml | 19 ++++++++++++++ docs/examples/music/settings.yaml | 38 ++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+) create mode 100644 docs/examples/music/README.txt create mode 100644 docs/examples/music/import/from_tellico.yaml create mode 100644 docs/examples/music/settings.yaml diff --git a/docs/examples/music/README.txt b/docs/examples/music/README.txt new file mode 100644 index 0000000..3eeb790 --- /dev/null +++ b/docs/examples/music/README.txt @@ -0,0 +1,4 @@ +This is an example lesana collection for music. + +The file ``import/from_tellico.yaml`` can be used with ``lesana export`` +from a collection generated by ``tellico2lesana`` from a tellico 3.x file. diff --git a/docs/examples/music/import/from_tellico.yaml b/docs/examples/music/import/from_tellico.yaml new file mode 100644 index 0000000..adeb68e --- /dev/null +++ b/docs/examples/music/import/from_tellico.yaml @@ -0,0 +1,19 @@ +title: "{{ title }}" +artists: {% if artists %}{% for a in artists %} + - "{{ a }}"{% endfor %}{% else %}[]{% endif %} +label: {% if labels %}"{{ labels | join("; ") }}"{% else %}''{% endif %} +year: '{{ year }}' +genres: {% if genres %}{% for g in genres %} + - "{{ g }}"{% endfor %}{% endif %} +# medium (string): CD|DVD|Cassette|Vynil +medium: '{{ medium }}' +purchase_date: '{{ pur_date }}' +purchase_price: '{{ pur_price }}' +gift: "{{ gift }}" +tracks: {% for t in tracks %} + - title: "{{ t[0] }}" + artist: "{{ t[1] | default('') | replace('None', '') }}" + length: "{{ t[2] | default('') | replace('None', '') }}" + side: "{{ t[3] | default('') | replace('None', '') }}"{% else %}[]{% endfor %} +comments: | + {{ comments | default('.') | indent(width=4, first=False) }} diff --git a/docs/examples/music/settings.yaml b/docs/examples/music/settings.yaml new file mode 100644 index 0000000..fdad13f --- /dev/null +++ b/docs/examples/music/settings.yaml @@ -0,0 +1,38 @@ +name: My Music +lang: english +entry_label: '{{ short_id }}: {{ artists | join("; ") }} / {{ title }}' +git: true +fields: +- name: title + type: string + index: free +- name: artists + type: list + list: string + index: free +- name: label + type: string + index: field +- name: year + type: integer + index: field +- name: genres + type: list + list: string + index: field +- name: medium + type: string + help: 'CD|DVD|Cassette|Vinyl|File' + index: field +- name: purchase_date + type: string +- name: purchase_price + type: string +- name: gift + type: boolean +- name: tracks + type: list + list: yaml +- name: comments + type: text + index: free -- cgit v1.2.3