View Single Post
Old 05-24-2024, 08:55 AM   #119
oston
Connoisseur
oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.
 
Posts: 81
Karma: 2138296
Join Date: Nov 2016
Device: ipad, Kindle Scribe, Kobo Libra 2
Quote:
Originally Posted by KevinH View Post
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
oston is offline   Reply With Quote