webOS Nation Forums >  Homebrew >  webOS Homebrew Apps > Kindle Import
Kindle Import
  Reply
Like Tree27Likes

 
Thread Tools Display Modes
Old 09/20/2011, 10:38 PM   #1 (permalink)
Homebrew Developer
 
Posts: 415
Description

Kindle Import is an App for the HP TouchPad that will faciliate sideloading books into the Kindle application. This application can be used in conjuction with Calibre (calibre - E-book management) and/or the mobi metadata and cover image extraction tool developed by m0ngr31 which can be downloaded from http://www.joeipson.com/kindleSide.zip (Windows only). See post 10 below for script usage instructions.

Kindle Import will import mobi files from the /media/internal/.palmkindle directory and cover images from the /media/internal/.palmkindle/coverCache directory. The book file name must be in one of the formats:

TITLE - AUTHOR.mobi
TITLE - AUTHOR - ASIN.mobi
TITLE - AUTHOR - ASIN - TOTAL_LOCATIONS.mobi

e.g. Way of Shadows, The - Brent Weeks - AABBCCCDDEE - 3752.mobi

If you do not provide an ASIN number a number will be generated. If you do not provide the TOTAL_LOCATIONS a default of 15000 will be used. The default values for ASIN and TOTAL_LOCATIONS will work fine, however, if the default 15000 TOTAL_LOCATIONS is used your progress bar in the Kindle Application will not accurately represent your progress in the book (in our example you might be on the last page of the book but your progress bar might only show 30%).

As mentioned above if you are not in the mood to rename all of your books you can make use of Calibre and/or m0ngr31s script. Calibre allows you to convert books from just about any format to mobi. Using the default settings calibre will convert the books to a compatible naming convention. Calibre also includes a "Send to Device" feature and recognizes the TouchPad as a device. You must have the TouchPad in USB Drive mode in order for Calibre to detect it.

Calibre 0.8.20 supports cover exporting for WebOS. If you have already imported your books using Kindle Import you will need to use the Delete Imported Books function followed by Load Books then Import Books after sending the books and covers from Calibre.

The Windows script written by m0ngre31 will extract cover images, ASIN number, and total locations from mobi files. You can then copy the files over to the TouchPad over USB to the appropriate directories.

See the Help dialog accessible through the menu for detailed usage instructions.

Download

Install from preware or download from here.

Installation and Usage Tips
  • If you get an operation error while loading and/or importing books reboot your TouchPad.
  • On rare occasions a restart does not solve the operation error. I have not been able to reproduce this issue but some users have been able to resolve it by downloading and installing the ipk while removing certain patches has resolved the issue for others. Please review the posts in this thread for possible solutions if you continue to have this problem.
  • If you use Kindle Import to remove a book make sure the book is not open in Kindle otherwise when you open Kindle it will hang and require you to de/reregister to fix it. If you reregister Kindle it will delete the book directory and you will need to copy the books to the device again. You can avoid this by backing up the .palmkindle directory and restoring it after you register.
  • Locations are not the same as page numbers. As mentioned above the only side effect of using the default 15k is that the book progress indicator will not be accurate in Kindle. If you did not use m0ngr3l's script to prepare the books you can edit the book locations. First, open the book, go to the last page, and write down the current location. Now, open Kindle Import, tap the Load Existing Books button, find your book, touch the locations text, enter the actual value, hit enter or tap another part of the screen, then close and reopen the book in Kindle


Credits
  • m0ngr31 for his code and idea contributions and his excellent mobi metadata extraction tool
  • Everyone who helped test and offered ideas for the application

Licensing
  • Kindle Import is licensed under the MIT license.

Changelog

Version 1.3.2
  • Added debug logging to assist in resolving issues

Version 1.3.1
  • Moved the book list below the feature buttons to make the buttons more accessible
  • Code refactoring and optimizations

Version 1.3.0
  • Added the ability to delete one or more books in addition to the delete all books option
  • Added the ability to change the book "locations" field prior or after importing
  • Disabled buttons that should not be used while in the current view
  • Added the ablity to choose which books to import (defaults to all)
  • User interface enhancements
  • Updated help dialog to reflect the new changes

Version 1.2.0
  • Added launch icon
  • Updated help dialog text

Version 1.1.6
  • Added a default cover image if a cover image is not provided

Version 1.1.5
  • Updated README and the Help Dialog to reflect the functional changes in 1.1.4

Version 1.1.4
  • Version 1.1.4 of the app should fix the database permissions issue

Version 1.1.2
  • Version 1.1.2 of the app automatically add the database permissions needed for the app to work. You no longer need to copy the com.palm.kindle file (thanks m0ngr31)

Version 1.1.0
  • Added support for Calibre exports

Version 1.0.0
  • Initial release with support for importing books based on data extracted from a pipe-delimited metadata export file
__________________
If you like my work on Kindle Import and the Calibre WebOS plugin and want to contribute toward improvements and future WebOS projects.


Last edited by kjhenrie; 12/26/2011 at 09:41 AM. Reason: Added install/usage tip
kjhenrie is offline   Reply With Quote
Liked by rtrip, docnas, Ubuntite and 12 others like this.
Old 09/21/2011, 07:18 AM   #2 (permalink)
Member
 
Posts: 26
1.2.0 works flawless. The icon is a welcomed addition.
newcultking is offline   Reply With Quote
Old 09/21/2011, 01:51 PM   #3 (permalink)
Member
 
Posts: 6
Doesn't work.

Copied the mobi files and covers from kindleSide as instructed.
When I press "load books" I get an error "operation failed" which dissapears after 2 seconds and it shows the found books.
Then I click "import books" and again an error "operation failed".

The books don't show up in the kindle app afterwards.
radry is offline   Reply With Quote
Old 09/21/2011, 01:56 PM   #4 (permalink)
Member
 
stbxxl's Avatar
 
Posts: 513
Quote:
Originally Posted by radry View Post
Doesn't work.

Copied the mobi files and covers from kindleSide as instructed.
When I press "load books" I get an error "operation failed" which dissapears after 2 seconds and it shows the found books.
Then I click "import books" and again an error "operation failed".

The books don't show up in the kindle app afterwards.
I have exactly the same results. I used the latest Calibre version to export a book to the TP (connected to my PC via USB drive).
stbxxl is offline   Reply With Quote
Old 09/21/2011, 02:46 PM   #5 (permalink)
Homebrew Developer
 
Posts: 415
radry and STBXXL try rebooting the TouchPad.
kjhenrie is offline   Reply With Quote
Thanked By: everythingsablur
Old 09/21/2011, 02:59 PM   #6 (permalink)
Member
 
Posts: 6
Quote:
Originally Posted by kjhenrie View Post
radry and STBXXL try rebooting the TouchPad.
Works perfectly now, thank you. You should add that to the description.
radry is offline   Reply With Quote
Old 09/21/2011, 03:34 PM   #7 (permalink)
Homebrew Developer
 
Posts: 415
Quote:
Originally Posted by radry View Post
Works perfectly now, thank you. You should add that to the description.
This was a problem at one point but appeared to be cleared up. I will add it to the description and add a post install reboot alert in the next version.
kjhenrie is offline   Reply With Quote
Old 09/21/2011, 04:26 PM   #8 (permalink)
Member
 
Posts: 363
Thanks for the great utility! After a full device reboot, it is working for me as well.

I do have a question regarding book covers though. I'm pulling books over from Calibre, so having to move covers over manually into the /media/internal/.palmkindle/coverCache directory. What is the expected file naming convention for covers? Looking at a sample book I downloaded, it has three image files in different sizes, and named appropriately large, medium, and small. I've monkeyed with copying over some JPG covers, and that's just seemed to screw up the display of covers for imported books altogether. Now all books have a blank, small box for a book cover.

Should they simply be named the same as the .mobi files? (I did try this with no luck )
Attached Images
File Type: png kindle_2011-21-09_172102.png (401.3 KB, 93 views) Email Attachment
everythingsablur is offline   Reply With Quote
Old 09/21/2011, 04:58 PM   #9 (permalink)
Homebrew Developer
 
Posts: 415
Quote:
Originally Posted by everythingsablur View Post
Thanks for the great utility! After a full device reboot, it is working for me as well.

I do have a question regarding book covers though. I'm pulling books over from Calibre, so having to move covers over manually into the /media/internal/.palmkindle/coverCache directory. What is the expected file naming convention for covers? Looking at a sample book I downloaded, it has three image files in different sizes, and named appropriately large, medium, and small. I've monkeyed with copying over some JPG covers, and that's just seemed to screw up the display of covers for imported books altogether. Now all books have a blank, small box for a book cover.

Should they simply be named the same as the .mobi files? (I did try this with no luck )
The filename for covers should be the same as the book with the -small.jpg, -medium.jpg, and -large.jpg replacing the .mobi extension.

e.g. My Book - Joe Schmoe.mobi should have the covers My Book - Joe Schmoe-small.jpg, My Book - Joe Schmoe-medium.jpg, and My Book - Joe Schmoe-large.jpg. Pay careful attention to spaces.

If you put covers in after you imported the books you will need to click the Delete all Imported Books from Kindle button followed by Load Books then Import Books to pick up the new covers.

You will need to look at the covers for a book you downloaded from Amazon to get the correct image sizes.
kjhenrie is offline   Reply With Quote
Old 09/21/2011, 05:20 PM   #10 (permalink)
Homebrew Developer
 
Posts: 365
For you guys using Calibre and want an easy way to get your books and covers over (until the TP driver for Calibre is updated to support all of this) can use the script that I wrote.

You can find it here: http://www.joeipson.com/kindleSide.zip

So here is how you do everything:
1. Deregister and then Reregister the Kindle App.
2. Install Kindle-Import from Preware
3. Restart your TP.
4. Use my script to take care of naming and cover art by extracting the .zip file into the directory where all your .MOBI/.AZW files are stored (**EDIT It does a recursive scan now**). Then run the kindleSide.bat file. Your books will be properly named and placed in a folder called .palmkindle. The cover images in a subfolder folder called coverCache. Copy these to your TP (in their respective folders).
5. Run the Kindle-Import app to load and then import your books.
6. Enjoy them in the Kindle app

You will need all the meta data and coverart set properly in Calibre for this to work right.

**EDIT**
I've updated the script to work with .AZW files, remove :'s from the Title of books (unable to use that as a filename), and made it recursive.

That means you can stick it in your Calibre library folder and it'll scan all of the subfolders and get everything it needs.

Last edited by m0ngr31; 09/22/2011 at 07:34 PM.
m0ngr31 is offline   Reply With Quote
Old 09/21/2011, 05:53 PM   #11 (permalink)
Member
 
Posts: 54
A quick note that should perhaps be added concerning reboot is that it must be a device restart and not simply a luna restart. This is something that those who installed Preware patch "Advanced Reset Options" need to be aware of.

I know when I first tried the process, luna reset did not work, only device reset did.
VitaminD is offline   Reply With Quote
Old 09/21/2011, 11:40 PM   #12 (permalink)
Banned
 
Posts: 58
Awesome, I've been waiting soo long for an app that sideloads to the kindle app! One thing though, I have everything tagged so well in Calibre, yet m0ngr3l's script seems to error on about half the mobis, something about EXTH not mathcing original, and just creates extensionless files in the books/coverart folders...any ideas as to what I might be missing here? (All the books are in the same directory, with their cover jpgs that calibre outputs.)
bmenot is offline   Reply With Quote
Old 09/21/2011, 11:57 PM   #13 (permalink)
Homebrew Developer
 
Posts: 365
Quote:
Originally Posted by bmenot View Post
Awesome, I've been waiting soo long for an app that sideloads to the kindle app! One thing though, I have everything tagged so well in Calibre, yet m0ngr3l's script seems to error on about half the mobis, something about EXTH not mathcing original, and just creates extensionless files in the books/coverart folders...any ideas as to what I might be missing here? (All the books are in the same directory, with their cover jpgs that calibre outputs.)
nj suggested this in the other thread. Give it a shot and let me know...

Quote:
Originally Posted by nj View Post
The "bogus database name!" problem is, I think, caused by the mobi having a non zero 32nd byte.

Kindle and Calibre don't mind this but mobi2mobi does. Strictly speaking mobi2mobi is right the 32 byte database name is supposed to be zero terminated.

If your comfortable using a hexeditor, set the 32nd byte (offset 0x1F) to 00 and the mobi should be accepted by mobi2mobi.

Or you can use Calibre, load the book and edit the metadata and shorten the title to 31 or less characters (spaces count) and set 'title sort' to the same. Then use the convert option set the output to mobi. The resulting mobi should be accepted by mobi2mobi.

Somebody more familiar with Calibre could probably explain this better than me.

Of course it's possible the mobi has other problems, but if it's just this byte then the steps above should 'fix' it.
m0ngr31 is offline   Reply With Quote
Old 09/22/2011, 12:00 AM   #14 (permalink)
Member
 
Posts: 66
Is this the 'offical' thread now? What about the old one?
PainToad is offline   Reply With Quote
Old 09/22/2011, 12:21 AM   #15 (permalink)
Homebrew Developer
 
Posts: 415
I just finished updating the WebOS device plugin for Calibre so that it sends over cover images . Now I just need to finish up some details in the code and see if the Calibre developers will take it as a patch.
kjhenrie is offline   Reply With Quote
Old 09/22/2011, 12:53 AM   #16 (permalink)
Homebrew Developer
 
Posts: 415
Quote:
Originally Posted by PainToad View Post
Is this the 'offical' thread now? What about the old one?
I'll leave that up to m0ngr31 since he owns the other thread. Precentral required a thread in this forum to handle support for apps in their feed.
kjhenrie is offline   Reply With Quote
Old 09/22/2011, 01:14 AM   #17 (permalink)
Homebrew Developer
 
Posts: 365
Quote:
Originally Posted by kjhenrie View Post
I just finished updating the WebOS device plugin for Calibre so that it sends over cover images . Now I just need to finish up some details in the code and see if the Calibre developers will take it as a patch.
Awesome! Now we just need locations. I have just one suggestion... Is there a way to have multiple profiles for a device? That way if amazon does ever support sideloading officially, it wouldn't require an update of calibre to work. Also some pReader people might not want all their books in the palmkindle folder. But that's just a thought.

Quote:
Originally Posted by kjhenrie View Post
I'll leave that up to m0ngr31 since he owns the other thread. Precentral required a thread in this forum to handle support for apps in their feed.
I'm fine with redirecting everything this way. The other one was getting bloated and people were missing the directions...
m0ngr31 is offline   Reply With Quote
Old 09/22/2011, 02:15 AM   #18 (permalink)
Banned
 
Posts: 58
Quote:
Originally Posted by m0ngr31 View Post
nj suggested this in the other thread. Give it a shot and let me know...
Well, I just tried opening one of the mobi's that failed, in a hex editor, checked the 32nd byte (offset 0x1F) and it was already 00. So it seems that isn't the problem. The title is also well under 32 characters. I guess I'll just wait for the Calibre plugin (maybe someone can upload a beta here?) , that sounds like the most streamlined way to do this . I still had success with 89/147 books with m0ngr31s, so not too shabby @ all!
bmenot is offline   Reply With Quote
Old 09/22/2011, 04:55 AM   #19 (permalink)
Member
 
Posts: 3
Fantastic App!!

My touchpad is now the eReader I wanted it to be! Thanks a Million!

I am wondering though, is the "Book Sync Error" in Kindle normal when opening an imported book?

Any fix for that Error Popup?
Capt.Insano is offline   Reply With Quote
Old 09/22/2011, 07:55 AM   #20 (permalink)
Homebrew Developer
 
Posts: 415
Quote:
Originally Posted by Capt.Insano View Post
Fantastic App!!

My touchpad is now the eReader I wanted it to be! Thanks a Million!

I am wondering though, is the "Book Sync Error" in Kindle normal when opening an imported book?

Any fix for that Error Popup?
I haven't seen that error on any of my books. Does it happen on all books? You could try deleting the imported books and trying one or two at a time.
kjhenrie is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0