View Single Post
Old 01-17-2011, 08:02 AM   #91
Edzilla
Member
Edzilla began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Dec 2008
Device: none
Quote:
Originally Posted by m0ngr31 View Post
NoWorthWhile: Sorry I don't have an android phone so I can't test the effects of the script

Does android download the cover automatically or something? Isn't there a setting on Calibre to include the cover art in the mobi file? I might just be up in the night though...
I think calibre puts the cover art in the .mobi file.

I've written a small script to automatically add a random ASIN and the EBOK tag to a .mobi file under linux.
I'm pretty sure the range of my random number is not great, but it works well.

Code:
#!/bin/bash

FLOOR=1000000

number=0   #initialize
NUMBER=$[ ( $RANDOM % 9999999 )  + 1000000 ]

str=$(printf "%04d" $NUMBER)

ASIN="B00"
ASIN=$ASIN$str


/path/to/mobi2mobi/binary/mobi2mobi --outfile "$1" --exthtype 113 --exthdata $ASIN "$1"
/path/to/mobi2mobi/binary/mobi2mobi --outfile "$1" --addexthtype 501 --exthdata "EBOK" "$1"
It takes a filename as parameter.

Last edited by Edzilla; 01-17-2011 at 08:32 AM.
Edzilla is offline   Reply With Quote