Quote:
Originally Posted by KevinH
Access-Aide Version v096 has now been released. It is available via our Sigil Plugin Index as an attachment (see the first post in this thread or from my github repo:
https://github.com/kevinhendricks/Access-Aide
It now includes the ability to take EMPTY alt attributes and look up the image's own metadata for XMP AltTextAccessibility or failing that, exif ImageDescription to auto fill alt attribute values.
It will NOT overwrite any existing image alt value.
|
Many thanks for this, Kevin. I just tested it on an epub that had about 50 images with alt-text entries in their metadata. I removed the alt-text in the HTML code for one of the images and ran the plugin. But the plugin failed when it came to the page containinf the image alt="".
Here is the error log for that image.
... OEBPS/BTYAO-Book1-12.xhtml # 1 src: image/Image950.jpg alt text:
Traceback (most recent call last):
File "C:\Users\jhswi\AppData\Local\Programs\Sigil\plugi n_launchers\python\launcher.py", line 142, in launch
self.exitcode = target_script.run(container)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jhswi\AppData\Local\sigil-ebook\sigil\plugins\Access-Aide\plugin.py", line 485, in run
alttext = get_image_metadata_alttext(imgpath, plang)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jhswi\AppData\Local\sigil-ebook\sigil\plugins\Access-Aide\plugin.py", line 248, in get_image_metadata_alttext
if marker == b"http://ns.adobe.com/xap/1.0/":
^^^^^^
UnboundLocalError: cannot access local variable 'marker' where it is not associated with a value
Error: cannot access local variable 'marker' where it is not associated with a value
Jim