Plugin guide
Recently I was pleased to see that development on Sigil is continuing and that the latest version of Sigil accepts plugins.
When I convert scanned PDF files into ePubs, a number of formatting errors arise and I run a series of Find/Replace operations to correct some of these errors. As I sometimes forget to run some searches I decided to put some of these operations into a plugin. However, information about writing plugins for Sigil is sparse, so I have have produced a very brief guide (attached) on how to write plugins that incorporate regular expressions and hope this will be useful to others.
I am also attaching a plugin that corrects some formatting errors that are produced when converting PDFs to ePubs. I am new to Python so I would be interested in comments on my code - there may be better ways of coding the plugin.
I will continue to develop the plugin (eg I will be including code for dealing with erroneous line breaks when I get time).
Last edited by CalibUser; 08-09-2015 at 05:56 AM.
Reason: Updating attachments
|