Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 06-06-2024, 02:10 PM   #136
noteon
Connoisseur
noteon is on a distinguished road
 
Posts: 55
Karma: 54
Join Date: Apr 2011
Location: NYC
Device: Many
Quote:
Originally Posted by KevinH View Post
FWIW, I am thinking of making the addition of the accessibility schema metadata contingent on no mathml, no javascript, no multi-media instead of aborting if they are detected in a future release of Access-Aide as that sounds like a good compromise.

That way one plugin works in both cases.
That makes sense.

I can't get past the "Not a valid plugin" error. I've gone through everything at https://www.mobileread.com/forums/sh...d.php?t=337608. Are there more current installation instructions somewhere?
noteon is offline   Reply With Quote
Old 06-06-2024, 02:55 PM   #137
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,097
Karma: 5450184
Join Date: Nov 2009
Device: many
What I posted posted for you is NOT a plugin. It is instead a python program used by a plugin in this case Access-Aide. The exact instructions on how to use it was in that post.

I will repeat it here:

Quote:
Download and unzip it to create a file called "plugin.py"

Then go to your Sigil Preferences Folder, into the plugins folder and then into the Access-Aide folder. Copy in this new plugin.py to replace its namesake inside the Access-Aide folder.

Completely exit out of Sigil. Then fire up Sigil.

Your Access-Aide plugin will now have been modified to not abort if mathml, javascripts or multi-media are used in the epub. But at the same time it will no longer update the opf metadata to add any accessibility metadata.

It is a very easy set of delete changes from the original plugin.py code so unless I over deleted something this should work.

Please give that a try and let me know if you run into any difficulties.
KevinH is online now   Reply With Quote
Old 06-06-2024, 02:57 PM   #138
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 39,438
Karma: 154108302
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by noteon View Post
That makes sense.

I can't get past the "Not a valid plugin" error. I've gone through everything at https://www.mobileread.com/forums/sh...d.php?t=337608. Are there more current installation instructions somewhere?
What you will need to do is to locate the plugin directory and replace the plugin.py file with the plugin.py from the .zip file. On a Window system, that directory is located in AppData. Full path is C:\Users\%username%\AppData\Local\sigil-ebook\sigil\plugins\Access-Aide.

I've attached a copy of Access Aide 0.97 with the modified plugin.py to this message. It should install as a plugin.
Attached Files
File Type: zip Access-Aide_modded.zip (31.3 KB, 155 views)

Last edited by DNSB; 06-06-2024 at 04:51 PM.
DNSB is online now   Reply With Quote
Old 06-06-2024, 03:00 PM   #139
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,097
Karma: 5450184
Join Date: Nov 2009
Device: many
@DNSB,

Thank you. I was pressed for time and did not understand that people might mistake it for a plugin. I should have instead posted what you did.


Quote:
Originally Posted by DNSB View Post
What you will need to do is to locate the plugin directory and replace the plugin.py file with the plugin.py from the .zip file. On a Window system, that directory is located in AppData. Full path is C:\Users\%username%\AppData\Local\sigil-ebook\sigil\plugins\Access-Aide.

I've attached a copy of Access Aide 0.97 with the modified plugin.py to this message. It should install as a plugin.
KevinH is online now   Reply With Quote
Old 06-06-2024, 04:02 PM   #140
noteon
Connoisseur
noteon is on a distinguished road
 
Posts: 55
Karma: 54
Join Date: Apr 2011
Location: NYC
Device: Many
So sorry, I didn't read carefully. Thanks again.
noteon is offline   Reply With Quote
Old 07-06-2024, 05:20 PM   #141
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,097
Karma: 5450184
Join Date: Nov 2009
Device: many
Access-Aide v1.0.0 Released

Access-Aide Version 1.0.0 has been released and is available as an attachment in the first post of this thread and directly from my personal github repo.

The changes in this version include:

- restrict adding xml:lang attribute to the OPF package tag to epub3, as not supported under epub2.

- instead of aborting when given an epub that uses audio, video, javascript, or mathml, Access-Aide will continue but NOT add the Accessibility Schema Metadata.

Comments and bug reports welcome.
KevinH is online now   Reply With Quote
Old Today, 10:38 AM   #142
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,184
Karma: 18843349
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Hello,
I'm getting a "Status:Failed" message with Access-Aide 1.0.0

It seems to hickup on svg files saying "Error: cannot identify image file":

Code:
Building a GUI to speed image alt attribute updates
   ...  OEBPS/Text/ata.html  # 1  src: ../Images/img_auth.png  alt text: 
   ...  OEBPS/Text/ata.html  # 2  src: ../Images/ico_e-mail.png  alt text: 
   ...  OEBPS/Text/ata.html  # 3  src: ../Images/ico_Facebook.svg  alt text: 
Traceback (most recent call last):
  File "C:\Program Files\Sigil\Sigil\plugin_launchers\python\launcher.py", line 142, in launch
    self.exitcode = target_script.run(container)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Dion\AppData\Local\sigil-ebook\sigil\plugins\Access-Aide\plugin.py", line 479, in run
    alttext = get_image_metadata_alttext(imgpath, plang)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Dion\AppData\Local\sigil-ebook\sigil\plugins\Access-Aide\plugin.py", line 234, in get_image_metadata_alttext
    with Image.open(imgpath) as im:
         ^^^^^^^^^^^^^^^^^^^
  File "site-packages\PIL\Image.py", line 3339, in open
PIL.UnidentifiedImageError: cannot identify image file 'C:\\Users\\Dion\\AppData\\Local\\Temp\\tmp924i4kez\\OEBPS\\Images\\ico_Facebook.svg'
Error: cannot identify image file 'C:\\Users\\Dion\\AppData\\Local\\Temp\\tmp924i4kez\\OEBPS\\Images\\ico_Facebook.svg'
I've tried a few different svg files and I'm not able to determine what, if anything, is wrong with the svg file itself. Here's the one that it doesn't like on this try:
Spoiler:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg 
   xmlns="http://www.w3.org/2000/svg"
   viewBox="0 0 1024 1024"
   width="1024"
   height="1024"
   version="1.1">

<path
   fill="#4267b2"
   d="M967.48,0h-911A56.51,56.51,0,0,0,0,56.52v911A56.51,56.51,0,0,0,56.52,1024H547V628H414V473H547V358.93c0-132.26,80.77-204.28,198.76-204.28,56.51,0,105.08,4.21,119.24,6.09V299l-81.37,0c-64.2,0-76.63,30.51-76.63,75.28V473H860.49l-20,155H707v396H967.48A56.51,56.51,0,0,0,1024,967.48v-911A56.51,56.51,0,0,0,967.48,0Z"/>

<path
   fill="#fff"
   d="M707,1024V628H840.5l20-155H707V374.28c0-44.77,12.43-75.28,76.63-75.28L865,299V160.74c-14.16-1.88-62.73-6.09-119.24-6.09-118,0-198.76,72-198.76,204.28V473H414V628H547v396Z"/>
</svg>


If it isn't designed to work with svg files at all, can we get it to skip them altogether? when it fails it doesn't get to the part to update/check the alt tags on all the images.

Thanks!

(Windows 11 - latest, Sigil 2.3.1)


Edit: the html tag is just a standard:
<img alt="" src="../Images/ico_Facebook.svg"/>

Last edited by Turtle91; Today at 10:58 AM.
Turtle91 is online now   Reply With Quote
Old Today, 11:01 AM   #143
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 767
Karma: 2297170
Join Date: Jan 2017
Location: Poland
Device: Various
I confirm. SVG files should be bypassed in get_image_metadata_alttext function.

@Turtle91: If you need a quick workaround then change a tiny bit in the code (line 484) in the plugin.py file.
Code:
        if not alttext or alttext=='':
            if not imgpath.lower().endswith('.svg'):
                alttext = get_image_metadata_alttext(imgpath, plang)
Surely KevinH will do better soon

Last edited by BeckyEbook; Today at 11:15 AM.
BeckyEbook is offline   Reply With Quote
Old Today, 11:18 AM   #144
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,903
Karma: 198500000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Pillow is still pretty much nowhere with SVG support, but it amazes me that it can't at least identify svgs without dying. It probably wouldn't help here, but still...

Last edited by DiapDealer; Today at 12:25 PM.
DiapDealer is offline   Reply With Quote
Old Today, 12:14 PM   #145
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,097
Karma: 5450184
Join Date: Nov 2009
Device: many
Thanks BeckyEbook,
Away traveling for next couple of weeks. Will add in your fix when I get back.
KevinH is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] ACE - DAISY EPUB Accessibility Checker wrapper Doitsu Plugins 37 07-15-2024 11:38 AM
Easier access to plugin prefs slowsmile Plugins 14 10-22-2017 01:42 PM
Help me improve my EPUB converter epubler Workshop 2 07-20-2011 09:15 PM
Epub Revision - accessibility support Nate the great ePub 1 02-23-2011 03:47 AM
Kindle 2 Accessibility Access Mode suggestions scotty1024 Amazon Kindle 4 02-28-2009 06:06 PM


All times are GMT -4. The time now is 05:55 PM.


MobileRead.com is a privately owned, operated and funded community.