From 0a0f97010b61068179f6b763d32ef0c16054f5bd Mon Sep 17 00:00:00 2001 From: HackerNCoder Date: Sun, 17 Mar 2024 01:17:38 +0100 Subject: [PATCH] Add prolewiki --- content/epubs/soviet-justice/contents.lr | 2 ++ models/book.ini | 4 ++++ templates/book.html | 1 + 3 files changed, 7 insertions(+) diff --git a/content/epubs/soviet-justice/contents.lr b/content/epubs/soviet-justice/contents.lr index e1216f1..7e45500 100644 --- a/content/epubs/soviet-justice/contents.lr +++ b/content/epubs/soviet-justice/contents.lr @@ -13,3 +13,5 @@ epub: russian-justice.epub --- html: russian-justice +--- +prolewiki: Russian_Justice diff --git a/models/book.ini b/models/book.ini index e5d46ca..fc8f874 100644 --- a/models/book.ini +++ b/models/book.ini @@ -30,6 +30,10 @@ type = strings label = html folder name type = string +[fields.prolewiki] +label = prolewiki Library: name +type = string + [fields.orig] label = Origin URL type = strings diff --git a/templates/book.html b/templates/book.html index f25f6d7..52aa854 100644 --- a/templates/book.html +++ b/templates/book.html @@ -33,6 +33,7 @@

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

{% if this.html %}

Read online

{% endif %} + {% if this.prolewiki %}

Read on ProleWiki

{% 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 %}