edrlab / thorium-reader

A cross platform desktop reading app, based on the Readium Desktop toolkit
https://www.edrlab.org/software/thorium-reader/
BSD 3-Clause "New" or "Revised" License
1.86k stars 158 forks source link

Daisy 2.02 and 3 - Error opening opf file or ncc.html file from non-zipped package #1905

Closed gelosoftONCE closed 1 year ago

gelosoftONCE commented 1 year ago

Hi! (From Madrid, Spain, ONCE) I can't open a Daisy 3 DTBook, the error message "publication manifest not defined" I have validated with DaisyPipeline 1: No errors Can you help me? OPF:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE package
  PUBLIC "+//ISBN 0-9673008-1-9//DTD OEB 1.2 Package//EN" "http://openebook.org/dtds/oeb-1.2/oebpkg12.dtd">
<package xmlns="http://openebook.org/namespaces/oeb-package/1.0/"
         unique-identifier="uid">
   <metadata>
      <dc-metadata xmlns:oebpackage="http://openebook.org/namespaces/oeb-package/1.0/">
         <dc:Format xmlns:dc="http://purl.org/dc/elements/1.1/">ANSI/NISO Z39.86-2005</dc:Format>
         <dc:Language xmlns:dc="http://purl.org/dc/elements/1.1/">es-ES</dc:Language>
         <dc:Date xmlns:dc="http://purl.org/dc/elements/1.1/">2023-01-11</dc:Date>
         <dc:Publisher xmlns:dc="http://purl.org/dc/elements/1.1/">SBO024</dc:Publisher>
         <dc:Title xmlns:dc="http://purl.org/dc/elements/1.1/">El proceso español : la catalanización de la política española y el desmantelamiento de la España de la Transición</dc:Title>
         <dc:Identifier xmlns:dc="http://purl.org/dc/elements/1.1/" id="uid">0349726-packaged</dc:Identifier>
         <dc:Creator xmlns:dc="http://purl.org/dc/elements/1.1/">Juan Milián Querol</dc:Creator>
         <dc:Subject xmlns:dc="http://purl.org/dc/elements/1.1/">Materias (keyword)</dc:Subject>
         <dc:Source xmlns:dc="http://purl.org/dc/elements/1.1/">ISBN</dc:Source>
         <dc:Description xmlns:dc="http://purl.org/dc/elements/1.1/">Obra nueva - Síntesis de Voz</dc:Description>
         <dc:Contributor xmlns:dc="http://purl.org/dc/elements/1.1/">Contribuciones</dc:Contributor>
         <dc:Relation xmlns:dc="http://purl.org/dc/elements/1.1/">Colección. Serie</dc:Relation>
         <dc:Coverage xmlns:dc="http://purl.org/dc/elements/1.1/">OCIO/LABORAL/EDUCATIVO/INSTITUCIONAL</dc:Coverage>
         <dc:Rights xmlns:dc="http://purl.org/dc/elements/1.1/">ONCE</dc:Rights>
         <dc:Type xmlns:dc="http://purl.org/dc/elements/1.1/">B5-Complejidad-Sintesis</dc:Type>
      </dc-metadata>
      <x-metadata>
         <meta name="dtb:multimediaType" content="audioFullText"/>
         <meta name="dtb:totalTime" content="6:21:05.782"/>
         <meta name="dtb:multimediaContent" content="audio,text"/>
         <meta name="dtb:sourceEdition" content="número de edición/sin datos" />
         <meta name="dtb:sourceDate" content="2022" scheme="yyyy" />
         <meta name="dtb:sourcePublisher" content="Editorial" />
         <meta name="dtb:revision" content="3" />
         <meta name="dtb:revisionDate" content="2022-06-07" scheme="yyyy-mm-dd" />
         <meta name="dtb:sourceRights" content="Fuente de la publicación" />
         <meta name="dtb:sourceTitle" content="Título original" />
         <meta name="dtb:producedDate" content="2022-06-07" scheme="yyyy-mm-dd" />
         <meta name="dtb:producer" content="SBO024" />
         <meta name="dtb:revisionDescription" content="Etiquetado - Control - Postproducción" />
         <meta name="dtb:narrator" content="Lucía (Amazon)" />
      </x-metadata>
   </metadata>
   <manifest>
      <item href="book.opf" id="opf" media-type="text/xml"/>
      <item href="0349726.xml" id="opf-1" media-type="application/x-dtbook+xml"/>
      <item href="mo0.smil" id="mo0" media-type="application/smil"/>
      <item href="mo1.smil" id="mo1" media-type="application/smil"/>
      <item href="mo3.smil" id="mo3" media-type="application/smil"/>
      <item href="mo4.smil" id="mo4" media-type="application/smil"/>
      <item href="mo5.smil" id="mo5" media-type="application/smil"/>
      <item href="mo6.smil" id="mo6" media-type="application/smil"/>
      <item href="mo8.smil" id="mo8" media-type="application/smil"/>
      <item href="mo10.smil" id="mo10" media-type="application/smil"/>
      <item href="mo12.smil" id="mo12" media-type="application/smil"/>
      <item href="mo14.smil" id="mo14" media-type="application/smil"/>
      <item href="mo15.smil" id="mo15" media-type="application/smil"/>
      <item href="mo16.smil" id="mo16" media-type="application/smil"/>
      <item href="mo18.smil" id="mo18" media-type="application/smil"/>
      <item href="mo19.smil" id="mo19" media-type="application/smil"/>
      <item href="mo20.smil" id="mo20" media-type="application/smil"/>
      <item href="mo21.smil" id="mo21" media-type="application/smil"/>
      <item href="mo22.smil" id="mo22" media-type="application/smil"/>
      <item href="mo23.smil" id="mo23" media-type="application/smil"/>
      <item href="mo24.smil" id="mo24" media-type="application/smil"/>
      <item href="mo25.smil" id="mo25" media-type="application/smil"/>
      <item href="mo26.smil" id="mo26" media-type="application/smil"/>
      <item href="mo27.smil" id="mo27" media-type="application/smil"/>
      <item href="mo28.smil" id="mo28" media-type="application/smil"/>
      <item href="mo29.smil" id="mo29" media-type="application/smil"/>
      <item href="mo30.smil" id="mo30" media-type="application/smil"/>
      <item href="mo31.smil" id="mo31" media-type="application/smil"/>
      <item href="mo32.smil" id="mo32" media-type="application/smil"/>
      <item href="mo33.smil" id="mo33" media-type="application/smil"/>
      <item href="mo34.smil" id="mo34" media-type="application/smil"/>
      <item href="mo35.smil" id="mo35" media-type="application/smil"/>
      <item href="mo36.smil" id="mo36" media-type="application/smil"/>
      <item href="mo37.smil" id="mo37" media-type="application/smil"/>
      <item href="mo38.smil" id="mo38" media-type="application/smil"/>
      <item href="mo39.smil" id="mo39" media-type="application/smil"/>
      <item href="part0019_00_000.mp3" id="opf-36" media-type="audio/mpeg"/>
      <item href="part0019_00_001.mp3" id="opf-37" media-type="audio/mpeg"/>
      <item href="part0020_00_000.mp3" id="opf-38" media-type="audio/mpeg"/>
      <item href="part0020_00_001.mp3" id="opf-39" media-type="audio/mpeg"/>
      <item href="part0005_00_000.mp3" id="opf-40" media-type="audio/mpeg"/>
      <item href="part0010_00_000.mp3" id="opf-41" media-type="audio/mpeg"/>
      <item href="part0018_00_000.mp3" id="opf-42" media-type="audio/mpeg"/>
      <item href="part0018_00_001.mp3" id="opf-43" media-type="audio/mpeg"/>
      <item href="part0027_00_000.mp3" id="opf-44" media-type="audio/mpeg"/>
      <item href="part0027_00_001.mp3" id="opf-45" media-type="audio/mpeg"/>
      <item href="part0009_00_000.mp3" id="opf-46" media-type="audio/mpeg"/>
      <item href="part0009_00_001.mp3" id="opf-47" media-type="audio/mpeg"/>
      <item href="part0030_00_000.mp3" id="opf-48" media-type="audio/mpeg"/>
      <item href="part0017_00_000.mp3" id="opf-49" media-type="audio/mpeg"/>
      <item href="part0017_00_001.mp3" id="opf-50" media-type="audio/mpeg"/>
      <item href="part0026_00_000.mp3" id="opf-51" media-type="audio/mpeg"/>
      <item href="part0026_00_001.mp3" id="opf-52" media-type="audio/mpeg"/>
      <item href="part0002_00_000.mp3" id="opf-53" media-type="audio/mpeg"/>
      <item href="part0014_00_000.mp3" id="opf-54" media-type="audio/mpeg"/>
      <item href="part0014_00_001.mp3" id="opf-55" media-type="audio/mpeg"/>
      <item href="part0022_00_000.mp3" id="opf-56" media-type="audio/mpeg"/>
      <item href="part0022_00_001.mp3" id="opf-57" media-type="audio/mpeg"/>
      <item href="part0001_00_000.mp3" id="opf-58" media-type="audio/mpeg"/>
      <item href="part0001_00_001.mp3" id="opf-59" media-type="audio/mpeg"/>
      <item href="part0028_00_000.mp3" id="opf-60" media-type="audio/mpeg"/>
      <item href="part0025_00_000.mp3" id="opf-61" media-type="audio/mpeg"/>
      <item href="part0025_00_001.mp3" id="opf-62" media-type="audio/mpeg"/>
      <item href="part0016_00_000.mp3" id="opf-63" media-type="audio/mpeg"/>
      <item href="part0016_00_001.mp3" id="opf-64" media-type="audio/mpeg"/>
      <item href="part0015_00_000.mp3" id="opf-65" media-type="audio/mpeg"/>
      <item href="part0015_00_001.mp3" id="opf-66" media-type="audio/mpeg"/>
      <item href="part0007_00_000.mp3" id="opf-67" media-type="audio/mpeg"/>
      <item href="part0024_00_000.mp3" id="opf-68" media-type="audio/mpeg"/>
      <item href="part0024_00_001.mp3" id="opf-69" media-type="audio/mpeg"/>
      <item href="part0012_00_000.mp3" id="opf-70" media-type="audio/mpeg"/>
      <item href="part0012_00_001.mp3" id="opf-71" media-type="audio/mpeg"/>
      <item href="part0023_00_000.mp3" id="opf-72" media-type="audio/mpeg"/>
      <item href="part0023_00_001.mp3" id="opf-73" media-type="audio/mpeg"/>
      <item href="part0029_00_000.mp3" id="opf-74" media-type="audio/mpeg"/>
      <item href="part0011_00_000.mp3" id="opf-75" media-type="audio/mpeg"/>
      <item href="part0011_00_001.mp3" id="opf-76" media-type="audio/mpeg"/>
      <item href="part0013_00_000.mp3" id="opf-77" media-type="audio/mpeg"/>
      <item href="part0013_00_001.mp3" id="opf-78" media-type="audio/mpeg"/>
      <item href="part0006_00_000.mp3" id="opf-79" media-type="audio/mpeg"/>
      <item href="part0006_00_001.mp3" id="opf-80" media-type="audio/mpeg"/>
      <item href="part0008_00_000.mp3" id="opf-81" media-type="audio/mpeg"/>
      <item href="part0021_00_000.mp3" id="opf-82" media-type="audio/mpeg"/>
      <item href="part0021_00_001.mp3" id="opf-83" media-type="audio/mpeg"/>
      <item href="part0003_00_000.mp3" id="opf-84" media-type="audio/mpeg"/>
      <item href="part0003_00_001.mp3" id="opf-85" media-type="audio/mpeg"/>
      <item href="part0000_00_000.mp3" id="opf-86" media-type="audio/mpeg"/>
      <item href="part0000_00_001.mp3" id="opf-87" media-type="audio/mpeg"/>
      <item href="part0004_00_000.mp3" id="opf-88" media-type="audio/mpeg"/>
      <item href="navigation.ncx"
            id="ncx"
            media-type="application/x-dtbncx+xml"/>
      <item href="resources.res"
            id="resource"
            media-type="application/x-dtbresource+xml"/>
      <item href="dtbookbasic.css" id="opf-91" media-type="text/css"/>
   </manifest>
   <spine>
      <itemref idref="mo0"/>
      <itemref idref="mo1"/>
      <itemref idref="mo3"/>
      <itemref idref="mo4"/>
      <itemref idref="mo5"/>
      <itemref idref="mo6"/>
      <itemref idref="mo8"/>
      <itemref idref="mo10"/>
      <itemref idref="mo12"/>
      <itemref idref="mo14"/>
      <itemref idref="mo15"/>
      <itemref idref="mo16"/>
      <itemref idref="mo18"/>
      <itemref idref="mo19"/>
      <itemref idref="mo20"/>
      <itemref idref="mo21"/>
      <itemref idref="mo22"/>
      <itemref idref="mo23"/>
      <itemref idref="mo24"/>
      <itemref idref="mo25"/>
      <itemref idref="mo26"/>
      <itemref idref="mo27"/>
      <itemref idref="mo28"/>
      <itemref idref="mo29"/>
      <itemref idref="mo30"/>
      <itemref idref="mo31"/>
      <itemref idref="mo32"/>
      <itemref idref="mo33"/>
      <itemref idref="mo34"/>
      <itemref idref="mo35"/>
      <itemref idref="mo36"/>
      <itemref idref="mo37"/>
      <itemref idref="mo38"/>
      <itemref idref="mo39"/>
   </spine>
</package>
danielweck commented 1 year ago

Hello, thank you for filing this bug. Any change you could privately share the fileset with me please? (I am a lead developer in the Thorium project, my email address is daniel.weck@gmail.com )

gelosoftONCE commented 1 year ago

Hi! Thanks for your email! I'll upload the book (Daisy 3) with Wetransfer Kind regards!

El vie, 27 ene 2023 a las 20:39, Daniel Weck @.***>) escribió:

Hello, thank you for filing this bug. Any change you could privately share the fileset with me please? (I am a lead developer in the Thorium project, my email address is @.*** )

— Reply to this email directly, view it on GitHub https://github.com/edrlab/thorium-reader/issues/1905#issuecomment-1406992168, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5HOZUC4KBRLCCIINNROXDDWUQP6RANCNFSM6AAAAAAT2LCO7Y . You are receiving this because you authored the thread.Message ID: @.***>

danielweck commented 1 year ago

Hello, I am unable to reproduce this bug with Thorium 2.2 I tested with both the ZIP file, and also the unzipped publication (by choosing the OPF file)

danielweck commented 1 year ago

PS: in my tests the rendering of the DTBOOK XML file is very slow / janky. I am not sure if this is because of my specific Mac OS system settings, or if this is a general issue which also occurs on standard Mac OS and Windows / Linux too (I am seeing weird focus jump since I reconfigured by keyboard access / focus management ... I haven't found the cause yet). It is quite common to observe poor performance in Thorium with large XHTML documents, but in EPUB this is quite rare because the good authoring practice is to create a spine / reading order composed of reasonably-sized documents. In the DAISY3 / DTBOOK world large XML documents are much more common, unfortunately.

gelosoftONCE commented 1 year ago

Hi! Thank you very much for your time!! Maybe I don't understand your answer correctly, but I understand that the same problema doesn't happen to you, right? (...) Here, in ONCE (Organización Nacional de Ciegos Españoles), we work under Windows; and it's true, our XML Documents (in general) are "heavies". We have considered migrating to Epub3, but for now, it is not possible. We've also tried other players like EasyReader (Dolphin) o FSReader (Freedom Scientific), but honestly, we like Thorium better... Anyway, do you think this problem can be solved in the future? And the last thing, I just tried with a Daisy 2.02 book and it doesn't work either...

Thanks again! ¡Abrazos desde Madrid!

El mié, 8 feb 2023 a las 18:36, Daniel Weck @.***>) escribió:

PS: in my tests the rendering of the DTBOOK XML file is very slow / janky. I am not sure if this is because of my specific Mac OS system settings, or if this is a general issue which also occurs on standard Mac OS and Windows / Linux too (I am seeing weird focus jump since I reconfigured by keyboard access / focus management ... I haven't found the cause yet). It is quite common to observe poor performance in Thorium with large XHTML documents, but in EPUB this is quite rare because the good authoring practice is to create a spine / reading order composed of reasonably-sized documents. In the DAISY3 / DTBOOK world large XML documents are much more common, unfortunately.

— Reply to this email directly, view it on GitHub https://github.com/edrlab/thorium-reader/issues/1905#issuecomment-1422995654, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5HOZUEMEICM7JSTM26V4TLWWPKQJANCNFSM6AAAAAAT2LCO7Y . You are receiving this because you authored the thread.Message ID: @.***>

danielweck commented 1 year ago

You are correct, we are currently not able to reproduce the problem (tried on Linux and Mac ... need to check Windows too). We are investigating.

I would very much like to fix the performance problems with large DTBOOK XML files. A desktop app like Thorium should be able to render big HTML files without significant slow-downs (the open-source Chromium web browser engine is used to display publication documents).

Could you please send me a DAISY2.02 for testing? Thank you!

gautierchomel commented 1 year ago

I confirm I can reproduce the error on windows 10 Thorium 2.2 while trying to open opf file directly.

Opening the zip works fine.

gelosoftONCE commented 1 year ago

Hi! ¡it's true, the Zip works! Thanks!

danielweck commented 1 year ago

Ah, this was a tricky bug to fix (mainly because of tracing code execution on Windows and Mac to compare filesystem path resolutions) ... but in the end it was a stupid code mistake in one of Thorium's utility library where the backslash path separator of Windows filesystem wasn't handled correctly (only forward slash was correctly processed). The bug only affected non-zipped publication packages.