Skip to content

Commit 692c684

Browse files
authored
Implement new PG HTML <title> field format (#15)
1 parent d29f7c8 commit 692c684

1 file changed

Lines changed: 3 additions & 15 deletions

File tree

pphtml.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class initialization
6464
self.sdir = "" # to find the images
6565
self.encoding = ""
6666
self.NOW = strftime("%A, %Y-%m-%d %H:%M:%S")
67-
self.VERSION = "2022.12.28"
67+
self.VERSION = "2023.01.14"
6868
self.onlyfiles = [] # list of files in images folder
6969
self.filedata = [] # string of image file information
7070
self.fsizes = [] # image tuple sorted by decreasing size
@@ -747,21 +747,9 @@ def h1Title(self):
747747
r.append(" title: {}".format(t3))
748748
r.append(" h1: {}".format(t4))
749749

750-
if "Gutenberg" not in t3:
750+
if not t3.endswith(" | Project Gutenberg"):
751751
r.append("[☰warn☷] title should be of the form")
752-
r.append(
753-
" The Project Gutenberg eBook of Alice's Adventures in Wonderland,"
754-
+ " by Lewis Carroll"
755-
)
756-
# avoid trap in WWer's software (addhd.c)
757-
if "end" not in t3:
758-
r.append(" or")
759-
r.append(
760-
" Alice's Adventures in Wonderland, by Lewis Carroll&mdash;A"
761-
+ " Project Gutenberg eBook"
762-
)
763-
if t3.endswith("."):
764-
r.append(" Information: title ends with full stop")
752+
r.append(" Alice's Adventures in Wonderland | Project Gutenberg")
765753
self.apl(r)
766754

767755
def langCheck(self):

0 commit comments

Comments
 (0)