Quote:
Originally Posted by jbacelar
First, sorry for my horrible English.
What I do to renumber notes.
Required:
The text in question in a single file. In your case put behind each "Chapter" a character that does not exist in the original file. For example @.
Phyton 2.7 installed.
Run the py, which attached, in the folder where the file is.
And that's it!
Note:
Change the extension "Renumerar notas.txt" a "Renumerar notas.py".
Of course, first you have to tune the py your needs. (With any text editor).
n = start counter. (Usually 0)
i = increased. (Usually 1)
regex = search the strange character. In this case: re.compile (r "(@)")
files = ["file name"]
The file extension (shown as html), you put the need.
I hope you find it useful.
|
Perhaps you'd like to turn that into
a Sigil plugin?