From 3ff9b48373bf6989f26caa66ceac739cf401ad69 Mon Sep 17 00:00:00 2001 From: HackerNCoder Date: Fri, 29 Dec 2023 15:26:36 +0100 Subject: [PATCH] Move Callcott to epubs. Small changes to templates --- content/epubs/soviet-justice/contents.lr | 10 ++++++++++ content/wishes/soviet-justice/contents.lr | 11 ----------- templates/bib.html | 4 ++-- templates/book.html | 4 ++-- templates/nav.html | 3 +-- 5 files changed, 15 insertions(+), 17 deletions(-) create mode 100644 content/epubs/soviet-justice/contents.lr delete mode 100644 content/wishes/soviet-justice/contents.lr diff --git a/content/epubs/soviet-justice/contents.lr b/content/epubs/soviet-justice/contents.lr new file mode 100644 index 0000000..af5221b --- /dev/null +++ b/content/epubs/soviet-justice/contents.lr @@ -0,0 +1,10 @@ +title: Russian Justice +--- +author: Mary Stevenson Callcott +--- +publisher: Macmillan Company +--- +pub_date: 1935 +--- +orig: +https://archive.org/details/russianjustice0000mary, russianjustice.zip diff --git a/content/wishes/soviet-justice/contents.lr b/content/wishes/soviet-justice/contents.lr deleted file mode 100644 index dbd3ed6..0000000 --- a/content/wishes/soviet-justice/contents.lr +++ /dev/null @@ -1,11 +0,0 @@ -title: Soviet Justice ---- -subtitle: Possible alt name: Russian Justice. Anna uses Stevens, not Stevenson, in TSW, but most places on the internet uses -on, so I presume that's her actual name. ---- -author: Mary Stevenson Callcott ---- -publisher: UKN. ---- -pub_date: UKN. Presumed around 1936 ---- -ref: This Soviet World diff --git a/templates/bib.html b/templates/bib.html index f9b9601..6c96fed 100644 --- a/templates/bib.html +++ b/templates/bib.html @@ -12,8 +12,8 @@ {% for post in this.children %}
  • {{ post.title }} - {% if post.epub %}{% for item in post.epub %}[{% set urls = item.split(", ") %}{% for url in urls %}{% if "https://" in url %}{{ url.split('https://')[1].split('/')[0] }}{% else %}EPUB{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}] {% endfor %}{% endif %} - {% if post.orig %}{% for item in post.orig %}({% set urls = item.split(", ") %}{% for url in urls %}{% if "https://" in url %}{{ url.split('https://')[1].split('/')[0] }}{% elif "http://" in url %}{{ url.split('http://')[1].split('/')[0] }}{% else %}cached{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}) {% endfor %}{% endif %}
    + {% if post.epub %}{% for item in post.epub %}[{% set urls = item.split(", ") %}{% for url in urls %}{% if "http" in url %}{{ url.split('://')[1].split('/')[0] }}{% else %}EPUB{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}] {% endfor %}{% endif %} + {% if post.orig %}{% for item in post.orig %}({% set urls = item.split(", ") %}{% for url in urls %}{% if "http" in url %}{{ url.split('://')[1].split('/')[0] }}{% else %}cached{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}) {% endfor %}{% endif %}
    {% if post.subtitle %}{{ post.subtitle }}
    {% endif %} {% if post.author %}by {{ post.author }}
    {% endif %} {% if post.publisher %}{{ post.publisher}}, {% endif %}{{ post.pub_date }} diff --git a/templates/book.html b/templates/book.html index 777ae09..6af4e90 100644 --- a/templates/book.html +++ b/templates/book.html @@ -31,8 +31,8 @@

    {% if this.publisher %}{{ this.publisher }}, {% endif %}{{ this.pub_date }}

    {% if this.author %}

    {{ this.author }}

    {% endif %}
    - {% if this.epub %}

    Download EPUB:

    {% for item in this.epub %}

    {% set urls = item.split(", ") %}{% for url in urls %}{% if "https://" in url %}{{ url.split('https://')[1].split('/')[0] }}{% else %}comlib.encryptionin.space{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}

    {% endfor %}{% endif %} - {% if this.orig %}

    Download source PDF:

    {% for item in this.orig %}

    {% set urls = item.split(", ") %}{% for url in urls %}{% if "https://" in url %}{{ url.split('https://')[1].split('/')[0] }}{% elif "http://" in url %}{{ url.split('http://')[1].split('/')[0] }}{% else %}cached{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}

    {% endfor %}{% endif %} + {% if this.epub %}

    Download EPUB:

    {% for item in this.epub %}

    {% set urls = item.split(", ") %}{% for url in urls %}{% if "http" in url %}{{ url.split('://')[1].split('/')[0] }}{% else %}comlib.encryptionin.space{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}

    {% endfor %}{% endif %} + {% if this.orig %}

    Download source PDF:

    {% for item in this.orig %}

    {% set urls = item.split(", ") %}{% for url in urls %}{% if "http" in url %}{{ url.split('://')[1].split('/')[0] }}{% else %}cached{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}

    {% endfor %}{% endif %}
    diff --git a/templates/nav.html b/templates/nav.html index 8c9e288..fed38af 100644 --- a/templates/nav.html +++ b/templates/nav.html @@ -4,8 +4,7 @@ {% for href, title in [ ['/wishes', 'Wishes'], ] %} - {{ title }}
  • + {{ title }} {% endfor %}