View Single Post
Old 06-24-2024, 03:47 PM   #58
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,809
Karma: 6000000
Join Date: Nov 2009
Device: many
Standalone python OPF manifest id Updater

Okay just in case anyone is interested in a standalone python opf id updater that they can play with and tweak.

I have written one that uses modified version of an earlier opf parser I had lying around and some valid id generation code I borrowed from Sigil and converted to python and a pure python third party module called unidecode (to ascify file names) to make them suitable for id values.

I have put all of this in a zip and it is free for anyone to use in their own plugin or anyplace else.

It follows the rough approach of my previous post, should work for epub2 and epub3.

And since it uses a stateful opf parser, it can function in one pass.

I have attached it. Feel free to tweak it to make it suit your needs.

Comments and Improvements welcome.

Last edited by KevinH; 07-06-2024 at 04:17 PM. Reason: Removed outdated attachment
KevinH is offline   Reply With Quote