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, 03: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, 03: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,160
Karma: 5450818
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 offline   Reply With Quote
Old 06-06-2024, 03: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: 40,549
Karma: 157444380
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Edit: removed obsolete plugin attachment

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.

Last edited by DNSB; 09-23-2024 at 07:32 PM.
DNSB is offline   Reply With Quote
Old 06-06-2024, 04: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,160
Karma: 5450818
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 offline   Reply With Quote
Old 06-06-2024, 05: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, 06: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,160
Karma: 5450818
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 offline   Reply With Quote
Old 09-23-2024, 11: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,225
Karma: 19000635
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; 09-23-2024 at 11:58 AM.
Turtle91 is offline   Reply With Quote
Old 09-23-2024, 12:01 PM   #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: 783
Karma: 2298438
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; 09-23-2024 at 12:15 PM.
BeckyEbook is online now   Reply With Quote
Old 09-23-2024, 12:18 PM   #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: 28,040
Karma: 199464182
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; 09-23-2024 at 01:25 PM.
DiapDealer is offline   Reply With Quote
Old 09-23-2024, 01: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,160
Karma: 5450818
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 offline   Reply With Quote
Old 09-25-2024, 07:11 PM   #146
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,225
Karma: 19000635
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
Quote:
Originally Posted by BeckyEbook View Post
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
That worked greeeeaaat! Thank you!
Turtle91 is offline   Reply With Quote
Old 10-15-2024, 10:46 AM   #147
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,160
Karma: 5450818
Join Date: Nov 2009
Device: many
Okay, I am back from my travels. Looking more closely at this, and instead of skipping svgs in get_image_metadata_alttext, I will instead alter that routine to handle svg first by reading in the svg and then parsing it for the contents of the top level (first) desc tag.

That should prevent the crashes while still giving svg with desc tag info a chance to initialize their alt strings.

Once I get it tested I will post a new version of Access-Aide with this change.

Thanks so much to BeckyEbook for tracking down the failure and making a fix!
KevinH is offline   Reply With Quote
Old 10-15-2024, 11:25 AM   #148
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,160
Karma: 5450818
Join Date: Nov 2009
Device: many
Access-Aide 1.0.1 Announceed

See the first post in this thread for the latest version of Access-Aide v101

Changes include:

- handle svg as a special case when trying to extract metadata from image files because Pillow barfs on all svg. For svg images, load the svg file and attempt to extract the top-level desc tag contents to provide an initial value for empty alt attributes on img tags that use svg.

You can also grab the latest Access-Aide source from my git repository:

https://github.com/kevinhendricks/Access-Aide

Special thanks to BeckyEbook for tracking this one dawn and generating a fix!
KevinH is offline   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 12:38 PM
Easier access to plugin prefs slowsmile Plugins 14 10-22-2017 02:42 PM
Help me improve my EPUB converter epubler Workshop 2 07-20-2011 10:15 PM
Epub Revision - accessibility support Nate the great ePub 1 02-23-2011 04:47 AM
Kindle 2 Accessibility Access Mode suggestions scotty1024 Amazon Kindle 4 02-28-2009 07:06 PM


All times are GMT -4. The time now is 02:11 PM.


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