texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: Attempt to fix copying image for epub3 test


From: Gavin D. Smith
Subject: branch master updated: Attempt to fix copying image for epub3 test
Date: Sat, 26 Feb 2022 15:13:27 -0500

This is an automated email from the git hooks/post-receive script.

gavin pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new fb8b72bdb9 Attempt to fix copying image for epub3 test
fb8b72bdb9 is described below

commit fb8b72bdb923351941f594fa62eb0ab2d1728163
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sat Feb 26 20:13:16 2022 +0000

    Attempt to fix copying image for epub3 test
    
    * tp/Texinfo/Convert/HTML.pm (html_image_file_location_name):
    Use the return value from Texinfo::Common::encode_file_name
    for the image file name.
    * tp/tests/formatting/list-of-tests (non_ascii_test_epub):
    Enable test and commit results.
---
 ChangeLog                                          |  10 ++++
 tp/Texinfo/Convert/HTML.pm                         |   2 +-
 tp/tests/formatting/list-of-tests                  |   2 +-
 .../res_parser/non_ascii_test_epub/os\303\251.1"   |   0
 .../res_parser/non_ascii_test_epub/os\303\251.2"   |   5 ++
 .../EPUB/images/an_\303\257mage.png"               | Bin 0 -> 514064 bytes
 .../os\303\251_epub_package/EPUB/os\303\251.opf"   |  17 +++++++
 .../EPUB/xhtml/nav_toc.xhtml"                      |  17 +++++++
 .../EPUB/xhtml/os\303\251.xhtml"                   |  53 +++++++++++++++++++++
 .../META-INF/container.xml"                        |   7 +++
 .../os\303\251_epub_package/mimetype"              |   1 +
 11 files changed, 112 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4f3944256d..559f62c834 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2022-02-26  Gavin Smith  <gavinsmith0123@gmail.com>
+
+       Attempt to fix copying image for epub3 test
+
+       * tp/Texinfo/Convert/HTML.pm (html_image_file_location_name):
+       Use the return value from Texinfo::Common::encode_file_name
+       for the image file name.
+       * tp/tests/formatting/list-of-tests (non_ascii_test_epub):
+       Enable test and commit results.
+
 2022-02-26  Gavin Smith  <gavinsmith0123@gmail.com>
 
        Encode @setfilename argument
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 374b41c4d8..2ef6df8c54 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -282,7 +282,7 @@ sub html_image_file_location_name($$$$)
         # will be moved by the caller anyway.
         # If the file path found was to be used it should be decoded to perl
         # codepoints too.
-        $image_file = $image_basefile.$extension;
+        $image_file = $file_name;
         $image_extension = $extension;
         last;
       }
diff --git a/tp/tests/formatting/list-of-tests 
b/tp/tests/formatting/list-of-tests
index ae16d92253..5bbcd7a3bc 100644
--- a/tp/tests/formatting/list-of-tests
+++ b/tp/tests/formatting/list-of-tests
@@ -22,4 +22,4 @@ cpp_lines ../../t/input_files/cpp_lines.texi
 non_ascii_command_line osé.texi --html --split=Mekanïk 
--document-language=Destruktïw -c 'Kommandöh vâl' -D TÛT -D 'vùr ké' -U ôndef 
-c 'FORMAT_MENU mînù' --macro-expand=@OUT_DIR@osé-texinfo.texi 
--internal-links=@OUT_DIR@intérnal.txt --css-include çss.css --css-include 
cêss.css --css-ref=rëf --css-ref=öref
 
 # test for the copying of image with non ascii characters for epub
-#non_ascii_test_epub osé.texi --init epub3.pm -c 'EPUB_CREATE_CONTAINER 0'
+non_ascii_test_epub osé.texi --init epub3.pm -c 'EPUB_CREATE_CONTAINER 0'
diff --git "a/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251.1" 
"b/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251.1"
new file mode 100644
index 0000000000..e69de29bb2
diff --git "a/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251.2" 
"b/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251.2"
new file mode 100644
index 0000000000..a4e41d842b
--- /dev/null
+++ "b/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251.2"
@@ -0,0 +1,5 @@
+osé.texi:15: warning: undefined flag: vùr
+osé.texi:23: @include: could not find not_existïng.téxi
+osé.texi:21: warning: @image file `dîrectory/imàge' (for HTML) not found, 
using `dîrectory/imàge.êxt'
+texi2any: @image file `dîrectory/imàge' can not be copied
+osé.texi:27: @verbatiminclude: could not find vi_not_existïng.téxi
diff --git 
"a/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_epub_package/EPUB/images/an_\303\257mage.png"
 
"b/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_epub_package/EPUB/images/an_\303\257mage.png"
new file mode 100644
index 0000000000..193409f6ba
Binary files /dev/null and 
"b/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_epub_package/EPUB/images/an_\303\257mage.png"
 differ
diff --git 
"a/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_epub_package/EPUB/os\303\251.opf"
 
"b/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_epub_package/EPUB/os\303\251.opf"
new file mode 100644
index 0000000000..e9108c970a
--- /dev/null
+++ 
"b/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_epub_package/EPUB/os\303\251.opf"
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<package xmlns="http://www.idpf.org/2007/opf"; version="3.2" 
unique-identifier="texi-uid">
+   <metadata xmlns:dc="http://purl.org/dc/elements/1.1/";>
+      <dc:identifier id="texi-uid">texinfo:osé</dc:identifier>
+      <dc:title>Tôp</dc:title>
+   </metadata>
+   <manifest>
+      <item id="nav" properties="nav" media-type="application/xhtml+xml" 
href="xhtml/nav_toc.xhtml"/>
+      <item id="unit1" media-type="application/xhtml+xml" 
href="xhtml/osé.xhtml"/>
+      <item id="unit2" media-type="application/xhtml+xml" 
href="xhtml/osé.xhtml"/>
+      <item id="image1" media-type=" image/png" href="images/an_ïmage.png"/>
+   </manifest>
+   <spine>
+      <itemref idref="unit1"/>
+      <itemref idref="unit2"/>
+   </spine>
+</package>
diff --git 
"a/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_epub_package/EPUB/xhtml/nav_toc.xhtml"
 
"b/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_epub_package/EPUB/xhtml/nav_toc.xhtml"
new file mode 100644
index 0000000000..6ed3ca41e9
--- /dev/null
+++ 
"b/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_epub_package/EPUB/xhtml/nav_toc.xhtml"
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns="http://www.w3.org/1999/xhtml"; 
xmlns:epub="http://www.idpf.org/2007/ops";>
+<head>
+<meta charset="utf-8" />
+<title>Tôp - Table of contents</title>
+</head>
+<body>
+<nav epub:type="toc" id="nav">
+<h1>Table of contents</h1>
+
+<ol>
+ <li><a href="osé.xhtml#Top">Tôp</a></li>
+ <li><a href="osé.xhtml#Chapt_00eaur">1 Chapteùr</a></li>
+</ol>
+</nav>
+</body>
+</html>
diff --git 
"a/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_epub_package/EPUB/xhtml/os\303\251.xhtml"
 
"b/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_epub_package/EPUB/xhtml/os\303\251.xhtml"
new file mode 100644
index 0000000000..1f32e0c774
--- /dev/null
+++ 
"b/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_epub_package/EPUB/xhtml/os\303\251.xhtml"
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml";>
+<!-- Created by texinfo, http://www.gnu.org/software/texinfo/ -->
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<title>Tôp</title>
+
+<meta name="description" content="Tôp"/>
+<meta name="keywords" content="Tôp"/>
+<meta name="resource-type" content="document"/>
+<meta name="distribution" content="global"/>
+<meta name="Generator" content="texi2any"/>
+<meta name="viewport" content="width=device-width,initial-scale=1"/>
+
+<style type="text/css">
+<!--
+span.program-in-footer {font-size: smaller}
+-->
+</style>
+
+
+</head>
+
+<body lang="en">
+
+<div class="top-level-extent" id="Top">
+<h1 class="top" id="Top-1">Tôp</h1>
+
+<div class="chapter-level-extent" id="Chapt_00eaur">
+<h1 class="chapter" id="Chapteur">1 Chapteùr</h1>
+
+
+<p>value vùr {No value for &#8216;vùr&#8217;}.
+</p>
+<p>In included téxt.
+</p>
+<img class="image" src="../images/an_ïmage.png" alt="öld"/>
+
+<img class="image" src="../images/dîrectory/imàge.êxt" alt="âlt"/>
+
+
+<pre class="verbatim">In included téxt.
+</pre>
+</div>
+</div>
+<p>
+  <span class="program-in-footer">This document was generated on <em 
class="emph">a sunny day</em> using <a class="uref" 
href="http://www.gnu.org/software/texinfo/";><em 
class="emph">texi2any</em></a>.</span>
+</p>
+
+
+</body>
+</html>
diff --git 
"a/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_epub_package/META-INF/container.xml"
 
"b/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_epub_package/META-INF/container.xml"
new file mode 100644
index 0000000000..b3efc6cc13
--- /dev/null
+++ 
"b/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_epub_package/META-INF/container.xml"
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<container version="1.0" 
xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
+    <rootfiles>
+        <rootfile full-path="EPUB/osé.opf"
+            media-type="application/oebps-package+xml" />      
+    </rootfiles>
+</container>
diff --git 
"a/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_epub_package/mimetype"
 
"b/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_epub_package/mimetype"
new file mode 100644
index 0000000000..403c4f02df
--- /dev/null
+++ 
"b/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_epub_package/mimetype"
@@ -0,0 +1 @@
+application/epub+zip



reply via email to

[Prev in Thread] Current Thread [Next in Thread]