Your Chat GPT / LLM has hallucinated fields that do not exist in a Sigil plugin. Namely sigil_version_min, and menu_entry are not part of any Sigil plugin. God knows how poor the code it generated is.
Why not have your chat gpt program properly add the alt text to the image's own metadata. That way Access-Aide can access it and handle the replacement automatically.
Or alternatively use Python function replace (new in 2.5.0) and in your python replace function when count == 1, have it read and store in your table into a python dict then just look up the capture string in the table to generate its replacement.
That is one of the reasons the python function replace was added. Be aware of the need to escape internal quotes, <, >, & chars inside the alt text as well.
And FWIW, I personally would not trust any image description from a Chat GPT that has not "read the book" so to speak. And probably would not trust it even if it did. Using Google's AI responses as a gauge, the false or failure rate is over 50%. Worse than worthless. Try asking the same question in slightly different way and get completely opposite responses. Most AI's do not even understand the concept of version numbers.
For example, according to Google's AI aria role tags are legal in epub2 but of course the concept of a version 2 is lost on the AI.
Last edited by KevinH; 06-30-2025 at 10:04 AM.
|