View Single Post
Old 08-19-2008, 09:45 PM   #3
montsnmags
Grand Sorcerer
montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.montsnmags ought to be getting tired of karma fortunes by now.
 
Posts: 10,155
Karma: 4632631
Join Date: Nov 2007
Device: Kindle
Okay, I think I have resolved the "How?" of my own post above.

As mentioned, it certainly looked like the problems was the "language" assigned to the ebook. Now, though the Mobipocket Desktop Reader didn't much care about the language of the book, the Iliad's Mobipocket Reader seemed to determine, when you did a lookup on a word from an ebook, that "Hey, that's a English/English-US/English-Great Britain/English Australia ebook, so you won't be wanting me to look in the French-English dictionary then", and thus not showing any words. This is not optimum for me - it's an assumption of the software that no French phrase ever appears in an English book (and you can substitute other languages in here instead of "French" and "English", and possibly apply these circumstances to other translation-dictionaries).

So, the "How?" comes in with one word, which I'm sure those experienced with it would instantly be thinking: mobiperl, and in particular mobi2mobi.

Noting that my ebooks that worked with the French-English dictionary had a language of "neutral", I wanted to change all of them to that.

Now, being a GUI sort, I futzed around trying to get the mobi2mobi GUI to work. Actually, I futzed around trying to get any of the mobiperl tools to work, but that's a whole other story, and a mark against me, not the tools. Anyway, eventually I got it sorted. The GUI didn't work for me, because it insisted on a language, whereas it appears that "neutral" effectively means "null". Bugger. (Real nice GUI though! Good stuff!). So reluctantly I headed to the command line tools (not that there's anything wrong with them - I just know my propensity to screw up longish commands). Well, it turns out that:

mobi2mobi "bookname.prc" --outfile "bookname.prc" --language ""

worked a treat (if anyone cares, not that my "outfile" is the same because I wanted it to be, since I made sure I was working on a copy, not the original file - no point in confusing myself with different names.

So, then I had to do it for 89 books, so I wrote a batch file...

...well, when I say "batch" file, what I did was copy all the affected file names to a spreadsheet, used some text fields to add the bits that went either side and in between of the bookname variables, and then combined them all together into the required command in other column, cut-and-pasted the result as a "value" rather than a formula into another column, and then cut-and-pasted that into a .txt file (to make sure it was right). I then cut-and-pasted that at the command prompt, and it went through running all the commands (with only minor problems with a few "read only" files that I then fixed and reran my "batch".).

Convoluted, yes? I'm sure others would have figured out much better ways to do all this (I'm just glad that those smart folk figured out things like the mobiperl tools!). I'm also going to need to do it with any mobipocket ebook that comes with a "language" if I want it to look at the French-English dictionary. The good news is though, it worked, and all my books now happily also refer to my French-English dictionary as well, thus in theory ending my spittle-flecked ranting against the world, at least, it would if it wasn't for...

...the bad news: the espresso machine broke. We're waiting on a part. I haven't had a coffee this morning. :

Cheers,
Marc
montsnmags is offline   Reply With Quote