From 793a5b33660d5455279f9229b4808a2bfaed399d Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Thu, 15 Dec 2022 12:33:16 +0100 Subject: [PATCH] Verse stats. --- requirements/requirements.txt | 2 +- src/documents/templates/documents/book_detail.html | 2 ++ src/documents/templates/documents/book_stats.html | 14 ++++++++++---- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 519d5745..3bc943db 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -10,7 +10,7 @@ python-slugify python-docx==0.8.11 Wikidata==0.7 -librarian==2.4.8 +librarian==2.4.9 ## Django Django==4.0.6 diff --git a/src/documents/templates/documents/book_detail.html b/src/documents/templates/documents/book_detail.html index 268fb57c..226c4d4e 100644 --- a/src/documents/templates/documents/book_detail.html +++ b/src/documents/templates/documents/book_detail.html @@ -188,6 +188,8 @@ {% trans "characters (with footnotes)" %} {% trans "words" %} {% trans "words (with footnotes)" %} + {% trans "wiersze (+ inne znaki)" %} + {% trans "wiersze (+ inne znaki, z przypisami)" %} diff --git a/src/documents/templates/documents/book_stats.html b/src/documents/templates/documents/book_stats.html index 793eaa2a..5ce14dea 100644 --- a/src/documents/templates/documents/book_stats.html +++ b/src/documents/templates/documents/book_stats.html @@ -1,9 +1,11 @@ {{ book.book_info.title|default:"???" }} - {{ stats.self.chars_with_fn|default_if_none:"?" }} {{ stats.self.chars|default_if_none:"?" }} - {{ stats.self.words_with_fn|default_if_none:"?" }} + {{ stats.self.chars_with_fn|default_if_none:"?" }} {{ stats.self.words|default_if_none:"?" }} + {{ stats.self.words_with_fn|default_if_none:"?" }} + {{ stats.self.verses|default_if_none:"?" }} + {{ stats.self.chars_out_verse|default_if_none:"?" }} zn. + {{ stats.self.verses_with_fn|default_if_none:"?" }} + {{ stats.self.chars_out_verse_with_fn|default_if_none:"?" }} zn. {% if stats.parts %} {% for part, partstats in stats.parts %} @@ -11,9 +13,13 @@ {% endfor %} Σ - {{ stats.total.chars_with_fn }} {{ stats.total.chars }} - {{ stats.total.words_with_fn }} + {{ stats.total.chars_with_fn }} {{ stats.total.words }} + {{ stats.total.words_with_fn }} + + {{ stats.total.verses }} + {{ stats.total.chars_out_verse }} zn. + {{ stats.total.verses_with_fn }} + {{ stats.total.chars_out_verse_with_fn }} zn. + {% endif %} -- 2.20.1