MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Plugins (https://www.mobileread.com/forums/forumdisplay.php?f=268)
-   -   [Plugin] Access-Aide - help improve epub accessibility (https://www.mobileread.com/forums/showthread.php?t=294900)

thiago.eec 02-03-2021 05:02 PM

Quote:

Originally Posted by thiago.eec (Post 4089522)
My system:
Windows 10 x64. Sigil 1.4.3. Acces-aide 0.5.1.

No. I'm using the most recent version of both.
No clue about this, then. I'll try it on Linux.

DNSB 02-03-2021 05:07 PM

Quote:

Originally Posted by thiago.eec (Post 4089522)
Attached is a scrambled version of a test case book. But I must say this didn't work with any of the books I tested. I even mended html files, before running the plugin (so, the DOCTYPE wouldn't be a problem).

I did a quick look at the file and there was no DOCTYPE visible. The first code block is prior to the mend while the second is after running mend.

Code:

<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" lang="pt-BR" xml:lang="pt-BR">
  <head>
    <title></title>

Code:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" lang="pt-BR" xml:lang="pt-BR">
<head>
  <title></title>


Doitsu 02-03-2021 05:16 PM

Quote:

Originally Posted by thiago.eec (Post 4089533)
I'll try it on Linux.

I just tested the plugin with a pre-release version of Sigil 1.5.0 built on 12/23/2020 from master on my Arch Linux machine, and the titles were properly populated with the toc entries.
However, on my 64bit Windows 10 machine, I got the same results as thiago.eec with Sigi 1.4.3.

thiago.eec 02-03-2021 05:17 PM

Quote:

Originally Posted by DNSB (Post 4089537)
I did a quick look at the file and there was no DOCTYPE visible. The first code block is prior to the mend while the second is after running mend.

Yes, I didn't mend it before sending (just cleared the title tags). But I did tested here after mending.

thiago.eec 02-03-2021 05:18 PM

Quote:

Originally Posted by Doitsu (Post 4089543)
I just tested the plugin with a pre-release version of Sigil 1.5.0 built on 12/23/2020 from master on my Arch Linux machine, and the titles were properly populated with the toc entries.
However, on my 64bit Windows 10 machine, I got the same results as thiago.eec with Sigi 1.4.3.

Thanks @Doitsu. Then it seems to be a Windows specific problem.

KevinH 02-03-2021 05:24 PM

Wow. I can not think of a change that would impact this plugin only on Windows since Sigil-1.4.3.

But I have so many Sigil builds lying around that my Sigil 1.4.3 on my mac may not be identical to whatever is on the releases page. I will download exactly that version and try the testcase with that exact version just in case it is a generic plugin bug that only exists in 1.4.3.


Quote:

Originally Posted by Doitsu (Post 4089543)
I just tested the plugin with a pre-release version of Sigil 1.5.0 built on 12/23/2020 from master on my Arch Linux machine, and the titles were properly populated with the toc entries.
However, on my 64bit Windows 10 machine, I got the same results as thiago.eec with Sigi 1.4.3.


KevinH 02-03-2021 05:33 PM

Okay, grabbed an official release build of Sigil-1.4.3 for mac from the Official Sigil github releases and wonloaded and installed it and ran Access-Aide on the provided testcase.

On load I had to run Mend to add the Doctypes and then invoked Access-Aide and it did its job correctly.

So something very Windows specific that impacts plugins is happening.

Very strange.

KevinH 02-03-2021 05:36 PM

I will ask DiapDealer to investigate this on his Windows build to see if he has any ideas.


Edit:

Passed along the testcase to him and asked DiapDealer to take a look when he gets a chance.

Interestingly enough I could not e-mail the plugin zip code to him as gmail barfed saying it was infected when of course it is just a zip with an executable inside and a bunch of python code. The executable is just to help see svg images in a tk plugin and is not needed.

Hopefully he will be able to track down what the issue is and hopefully fix it in master.

DiapDealer 02-03-2021 06:10 PM

I was going to say I was seeing the same thing on Windows, but it looks like I should just skip to seeing why it might work differently on Windows. :D

KevinH 02-03-2021 06:12 PM

Does it fail on master on Windows too?

BeckyEbook 02-03-2021 06:25 PM

Yes (Windows 10). I have the build prepared just now and the problem exists.

DiapDealer 02-03-2021 06:25 PM

I haven't tried that yet. I was using a version of Sigil (somewhat newer than 1.4.3) that I have on my work laptop in order to give it a quick test.

KevinH 02-03-2021 07:07 PM

So the problem may be with the executable as that is pretty much the only Windows specific thing. Perhaps it is causing the plugin to exit abnormally?

BeckyEbook 02-03-2021 07:15 PM

No, I see issue.
Code:

apath = os.path.normcase(apath)
For example:
titlemap says "OEBPS/introducao.xhtml",
but the bookpath says "OEBPS/Introducao.xhtml".

Since the bookpath in the titlemap is different than the actual name in the EPUB file – the condition is not met and the title is not inserted.

---
Edit: If the xhtml file name is written in lowercase (e.g. toc.xhtml) then the title is inserted because the bookpath matches the titlemap.

KevinH 02-03-2021 07:44 PM

But how does it work on Linux which is fully case sensitive?


All times are GMT -4. The time now is 08:24 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.