]> Sergey Matveev's repositories - galgen.git/commitdiff
.html inclusion
authorSergey Matveev <stargrave@stargrave.org>
Wed, 22 Feb 2023 10:47:50 +0000 (13:47 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Wed, 22 Feb 2023 10:47:50 +0000 (13:47 +0300)
README
galgen.zsh

diff --git a/README b/README
index 36251cce2f9ca83701ba9368eb93bf2a2158b5ec..ae9d26d94f9168c2a3c354c6188809d2338dad60 100644 (file)
--- a/README
+++ b/README
@@ -19,12 +19,12 @@ If it is JPEG XL, then, for compatibility reason with non-bleeding edge
 software, alternative format is generated too: either JPEG (if JPEG XL
 contains losslessly transcoded JPEG), or PNG (leaving off the alpha channel).
 
-If image file has corresponding .txt, then it will be included as a
-preformatted text on HTML page.
+If image file has corresponding .txt/.html, then it will be included on
+HTML page.
 
-All images are sorted my modification date and grouped by pages,
-linking them together. If directory contains ".txt", then it will be
-included on the first page as a preformatted text.
+All images are sorted my modification date and grouped by pages, linking
+them together. If directory contains ".txt"/".html", then it will be
+included on the first page.
 
 Following external utilities are called: djxl, jxlinfo, exiftool,
 pamtopng, pnmscale, pngcrush, advpng, webpinfo, dwebp, cwebp.
index 0e03a3a99d8e7440a37acd3407565f460c61e199..521f4c389d4bec2f9e668d9ad6b3daeceb7afbdc 100755 (executable)
@@ -63,6 +63,7 @@ EOF
         cat ${img}.txt >> $dst
         echo "</pre>" >> $dst
     }
+    [[ -r ${img}.html ]] && cat ${img}.html >> $dst
     echo "<hr/>" >> $dst
     if [[ $img:e = jxl ]] ; then
         echo "<pre>" >> $dst
@@ -128,10 +129,13 @@ EOF
     </head>
 <body>
 EOF
-    [[ $p -eq 1 ]] && [[ -r .txt ]] && {
-        echo "<pre>" >> $dst
-        cat .txt >> $dst
-        echo "</pre>" >> $dst
+    [[ $p -eq 1 ]] && {
+        [[ -r .txt ]] && {
+            echo "<pre>" >> $dst
+            cat .txt >> $dst
+            echo "</pre>" >> $dst
+        }
+        [[ -r .html ]] && cat .html >> $dst
     }
     [[ $p -eq 1 ]] ||
         echo "<a href=\"$(( $p - 1 )).page.html\">&lt;&lt;&lt;</a>" >> $dst