new exthupdt.py to update title in EXTH header to the filename
I've had need for such a tool for a while now - rather than using a few existing tools to achieve the same thing, but sometimes with unexpected side effects. I wrote this in the last few days...
exthupdt.py is unashamedly based on the code in mobiunpack.py 0.26 - thanks guys, you know who you are!
exthupdt.py simply and quickly updates the title in the EXTH header to the filename (less the extension) so it displays correctly (as I want it to appear) in the Kindle. The title at the end of the EXTH header (referenced in the MOBI header) is also updated. It can also optionally remove the ASIN record in the EXTH record so collection generators, to organise books in Author folders, now work as expected.
Usage: exthupdt.py [options] mobifile
Options:
-h, --help show this help message and exit
-d, --debug to print debug information
-r, --raw to create additional raw data files
-a, --asin to remove the ASIN record from the EXTH section
-t, --title to update the title to the filename (default=True)
the output is a .mobi file, so change the input file extension (e.g. to .m)
example: exthupdt.py --asin inputfile.m
Please report any problems here.
Have fun!
Dilo.
Last edited by dilo_sec; 07-24-2011 at 08:29 AM.
Reason: zip file update
|