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 02-17-2011, 06:15 AM   #1
soparch
Member
soparch began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Jun 2010
Device: none
How do I use mobiunpack?

I know that this will seem like an incredibly stupid question but how do I use mobiunpack? What I need is a simple tutorial on how to run the script and where I have to put the name of the book etc. I have Python downloaded but I am not familiar with command line tools so the basics would be appreciated. I have seen on various threads that Calibre can unpack mobi files to get at the html but once again I have no idea how to do it. I do not want to use Calibre to convert to ePub etc because I want to look at the original raw html/css file and Calibre changes the css when it converts. Any help would be very much appreciated. Thank you.
soparch is offline   Reply With Quote
Old 02-17-2011, 09:44 AM   #2
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
Hi soparch

There's probably a more sophisticated way of doing it but this is what I do (I use Windows Vista, so specific commands are based on that):

1. Install Python of course. Only needs to be done once, then you can forget about it, except for updating as necessary.

2. Put mobiunpack.py and the MOBI file you want to unpack into the same directory.

3. Click on Start - All Programs - Accessories - Command Prompt to open a DOS window.

4. In the DOS window, use the CD (change directory) command to get to the directory where you placed the MOBI file and mobiunpack.py. "CD .." takes you up one level in the directory structure. "CD directory_name" will move you down into the named directory.

5. Type the following command:
Code:
mobiunpack.py mobi_file_name.mobi
That will unpack the HTML and a recreated OPF file from the MOBI file, and place those in a subdirectory with the same name as the MOBI file. If you want to specify a subdirectory name for the resulting files to go in that is different to the MOBI file name, you can do so by adding the desired directory name to the command, like so:
Code:
mobiunpack.py mobi_file_name.mobi output_directory_name
I haven't needed to do anything else to use mobiunpack successfully - hopefully it'll prove as straightforward for you too, soparch.
DMSmillie is offline   Reply With Quote
Old 02-17-2011, 08:21 PM   #3
soparch
Member
soparch began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Jun 2010
Device: none
Thank you once again Donna your help is much appreciated.
soparch is offline   Reply With Quote
Old 02-17-2011, 10:46 PM   #4
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
No problem soparch - happy to be able to help.
DMSmillie is offline   Reply With Quote
Old 02-18-2011, 12:31 PM   #5
konrad
Member
konrad began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Feb 2010
Device: none
Hello All,
I too am trying to get mobiunpack to work.Trying to use mobiunpack.py the way suggested , does nothing.Trying to use MobiUnpack.pyw from "ebook-conversion-tools" gives me this error " Traceback (most recent call last):
File "D:\Downloads\Downloads\ebook-conversion-tools\MobiML2HTML.pyw", line 11, in <module>
import Tkinter
ImportError: No module named Tkinter".I have python ver 32 installed and have used other python scripts that have worked. If anyone could help me in this matter ,I would greatly appreciate it. Thank you
konrad is offline   Reply With Quote
Old 02-18-2011, 02:10 PM   #6
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,531
Karma: 43837842
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Konrad, you're trying to use the GUI front-end for mobiunpack. The instructions above were for the command line version (which can be found in a subfolder close by). The command line version will end in .py not .pyw

The reason the GUI is not working for you is because you've installed a minimalist version of Python that apparently does not include the Tkinter module. I always recommend ActiveState's version of Python for Windows users (Python.org recommends ActiveState!). It comes with Tkinter and many other extensions that commonly come preinstalled on most Linux or Mac machines.
DiapDealer is offline   Reply With Quote
Old 02-18-2011, 07:17 PM   #7
konrad
Member
konrad began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Feb 2010
Device: none
Thanks DiapDealer...I installed ActiveState's version of Python and everything is working fine now. Thanks very much for the info.
konrad is offline   Reply With Quote
Old 02-18-2011, 07:41 PM   #8
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,531
Karma: 43837842
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Not a problem.
DiapDealer is offline   Reply With Quote
Old 11-17-2011, 05:15 PM   #9
aodor
Member
aodor began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Apr 2011
Device: Kobo
Well I'm still struggling. I have Active State Python 2.7 and if I do:

>>> mobiunpack.py infile.mobi

it returns a syntax error and marks the "ïnfile" name of the file, no matter what I change it for.

I don't use python, so I don't knnow what the error might be.
aodor is offline   Reply With Quote
Old 11-17-2011, 09:29 PM   #10
travger
Evangelist
travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.
 
travger's Avatar
 
Posts: 469
Karma: 270594
Join Date: Aug 2010
Device: palm tx, Windows XP, Windows7
@aodor - MUST you use command line? I click on .pyw, browse to the prc file, click 'start' and voila!

For some reason program window shows only prc files, but no biggie - I just change .mobi to .prc and get it pried apart.
travger is offline   Reply With Quote
Old 11-17-2011, 09:50 PM   #11
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,531
Karma: 43837842
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by travger View Post
For some reason program window shows only prc files, but no biggie - I just change .mobi to .prc and get it pried apart.
Please tell me you're not renaming all your mobi files to .prc just to be able use the mobiunpack gui program.

The drop-down box for "Files of type:" does default to *.prc, but you can easily click on it and select *.mobi, *.azw, or All (*.*) to show and select files with different extensions.
DiapDealer is offline   Reply With Quote
Old 11-19-2011, 09:57 AM   #12
travger
Evangelist
travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.
 
travger's Avatar
 
Posts: 469
Karma: 270594
Join Date: Aug 2010
Device: palm tx, Windows XP, Windows7
Not all, only those I want to work on...
I was so happy with getting my paws on html that I never even thought to look farther.
THANK YOU, next time I'll look for the drop-down menu.

I'm slow worker/reader anyways and have not unpacked lot of books yet.
travger is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump


All times are GMT -4. The time now is 09:44 PM.


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