@KevinH & user_none:
IMHO, Javascript would be the perfect embedded scripting language for Sigil, because it has been designed for website manipulation and the
Qt Quick library already has JavaScript support.
Like Python it's cross-platform, relatively easy to learn, but unlike Python it doesn't require a separate HTML parser, which makes it perfect for HTML file manipulation.
Unlike the Python wrapper, which was designed to manipulate all parts of an epub, a hypothetical JavaScript wrapper would only need an HTML file iterator and the JavaScript equivalents of bk.readfile() and bk.writefile() to be useful.
Of course, since I'm not a programmer I have no idea how much work this would involve or whether this would be feasible at all.
Have you guys ever considered embedding a JavaScript interpreter?