dualmetafix.py v003
I had some more spare time and adding in some basic error testing and attempted to make things unicode safe by grabbing all arguments as utf-8 encoded and converting paths to full unicode only when needed.
So I would say this is now beta quality. Still not pretty. Still a real mishmash.
The palm database access stuff would be better as its own class and and the header and exth should all probably be their own classes as well to encapsulate the access routines.
Oh well. Please give this a try and let me know what troubles you run into. I am sure there are ways to speed this up as well by memory mapping the file and replacing specific sections directly in memory as opposed to using python strings but let's see if this works and is fast enough for what is needed.
Attached is dualmetafix.py version v003
|