Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
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: 31,183
Karma: 86241230
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
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, 76 views)
File Type: zip kindlenamer.py.zip (3.8 KB, 82 views)

Last edited by pdurrant; 11-22-2012 at 06:22 AM.
pdurrant is offline   Reply With Quote
Old 11-22-2012, 06:23 AM   #2
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: 31,183
Karma: 86241230
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
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.
pdurrant is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindlestrip Python script and AppleScript wrapper pdurrant Kindle Formats 133 07-11-2014 07:18 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


All times are GMT -4. The time now is 10:00 PM.


MobileRead.com is a privately owned, operated and funded community.