View Single Post
Old 11-19-2012, 05:22 AM   #1
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,496
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
KindleNamer: Kindle/Mobi File Naming AppleScript/Python Script

When first downloaded, Mobipocket and Amazon Kindle files often have weird names based on ISBN, ASIN or some truncated version of the book's name.

So, I have written a python script that extracts the name from the Mobipocket/Kindle file, and makes a duplicate of the file using the extracted name.

I also have a Drag&Drop AppleScript to make it easy to use for Mac users.

The script handles unicode and high ascii characters correctly and also tries to make sure that the files created don't have any illegal characters in their names. The script makes sure that a file doesn't exist with the same name, and will append numbers to the file name as needed to avoid over-writing files.

The AppleScript generates a log on the desktop of original names and new file names.

1.0 is attached. Please report any problems. If you're on Mac, the AppleScript is all you need (the python script is embedded). If not on a Mac, the python script is the only bit you can use.

Update:
1.0.2 adds in unicode command line support for windows, and simplifies the script a bit.
Attached Files
File Type: zip KindleNamer 1.0.2.app.zip (37.3 KB, 375 views)
File Type: zip kindlenamer.py.zip (3.8 KB, 405 views)

Last edited by pdurrant; 11-22-2012 at 06:22 AM.
pdurrant is offline   Reply With Quote