11-19-2012, 05:22 AM | #1 |
The Grand Mouse 高貴的老鼠
Posts: 71,484
Karma: 305784726
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. Last edited by pdurrant; 11-22-2012 at 06:22 AM. |
11-22-2012, 06:23 AM | #2 |
The Grand Mouse 高貴的老鼠
Posts: 71,484
Karma: 305784726
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Updated to 1.0.2 to add in command-line support of unicode file names for Windows, as Python 2.7 doesn't handle them properly by default. Also a few other improvements to unicode support.
|
Advert | |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kindlestrip Python script and AppleScript wrapper | pdurrant | Kindle Formats | 137 | 08-15-2017 01:16 AM |
KindleCover: AppleScript wrapper and Python script application | pdurrant | Amazon Kindle | 6 | 12-02-2012 07:14 AM |
Python script: batch create mobi's from epubs (if they don't exist) | jmeb | Conversion | 0 | 05-20-2011 01:14 PM |
how to use python script with windows xp | tuufbiz1 | Other formats | 12 | 01-08-2011 08:22 AM |
File naming on Kindle | tomsem | Calibre | 2 | 09-15-2010 01:05 AM |