Actually I do not want to edit file extensions but the name itself.
The idea is to rename the files to the content of some tags, e.g. title or h4 or whatever, if necessary with a numbering behind. (e.g. Section0001-xhtml -> MyTitle.xhtml, Section0002.xhtml -> TitleOfTheNextHTMLFIle.xhtml and so on)
For the plugin documentation, I can read the names of the files very easy (bk.text_iter()), but I have not the slightest idea where to find the actual file to do the renaming.
From your testme3 plugin, can it be that renaming can be done easiest by
- adding a new file
- copying content from old file to new file
- mapping the new file to the id of the old file (this is the point I am not sure about!)
- deleting the old file
This way I guess I do not have to bother with TOC entries and so on, but I may be completely wrong here.
|