View Single Post
Old 09-26-2014, 04:20 AM   #4
jbacelar
Interested in the matter
jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.
 
jbacelar's Avatar
 
Posts: 421
Karma: 426094
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook InkPad 3
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.
Attached Files
File Type: txt Renumerar notas.txt (377 Bytes, 397 views)
jbacelar is offline   Reply With Quote