Quote:
Originally Posted by JohnnyD
So here is another scripting alternative for Sigil: Global Search&Replace with support for regular expressions! It should be quite easy to implement in Sigil (there are lots of regex libraries with well-defined API's) and I think it will take care of 99% of my scripting needs...
|
Hi Johnny, (I'm sure you know this, but for the non-programmers at Mobileread...) regexes can do a lot for you as a user, but they only operate on your text. With scripting built into Sigil, we should be able to operate on Sigil itself (including some representation of the document, which comprises the text).
That means that other people can add functions to Sigil in an easy, and well defined way, or automate tedious operations. People who want to add more capability to Sigil could then write isolated plugins instead of having to change the core code of Sigil. Think of the way plugins work in web browsers, or how really advanced macros work in MS Word or Excel.
I believe the most popular choices mentioned so far include "good enough" regex support in any case (well, maybe not lua, but it has its own search and replace style operators IIRC).