Site hosted by Angelfire.com: Build your free website today!

mobipocket notes file extractor
or how to export your mobipocket notes to a text file

This package reads a .MBP file, which is the type of file that stores user added information to any of the file formats that "mobipocket reader" or "Kindle" can read.
(See www.mobipocket.com for a reader program, or amazon.com for the kindle device)

So, a .MBP file associated to a (for example) .PRC book file, would contain annotations, corrections, drawings and marks made by the user on the book content.

Can you export mobipocket/Kindle notes any other way?
Since 2010, it seems that amazon has set up a web page for Kindle users, throu which notes can be viewed...
That isn't a solution for mobipocket users or others, so in this case, u can use this app!

DOWNLOAD

Actual version: 0.5.c (11/2013):
(now it can print page numbers, recognizes Kindle Fire notes, manages international characters, and can export user drawings!, see version history).
If you use windows, download this package, obtained from my Perl code, and gratefully donated by an anonymous contributor: MBP_reader_v05c_win.zip (1.14 MiB)
If you use linux or unix, download this package: MBP_reader_v05c.zip (34 KiB)
This one contains the Perl source code, so it can also be run in a Windows with Perl support (see "running the script...", below).
Kindle users WARNING:
I've been informed that Amazon has changed the way their reader stores notes since the end of October 2012, in reaction to a third-party application that gained some public relevance lately and that also exported notes.
They show explanations and a workaround on that application's site.
It seems that Amazon have crypted mbp files: now they're ".embp" (encrypted) or ".smbp" (secured) files.
This means that they effectively negate access to bookmarks info to any third-party application.

MBP_reader cannot read these files. It just read "mbp" files.

I can assure I'm so sad as you for this unexpected turn of events, as user and also as programmer.

USAGE

running the program in WINDOWS
  1. Decompress all MBP_reader_v05c_win.zip files in the same FOLDER.
  2. Put a copy of your MBP FILES in that very same FOLDER.
  3. Double-clik on MBP_reader.exe ...
  4. If everything runs ok (maybe it won't, look contact below), all your notes will be in text files named after your original mbp files, plus a ".mbp_notes.txt" extension.
        If drawings exist in the mbp file, they'll be exported to GIF images, named after the mbp file, plus a number and ".gif" extension.
        In case of errors, they'll be reported in the file mbp.errors.txt. You can send me an email with the description of your problem in that file (idleloopyahoo.com).
        Anyway, if some problem arises not related to your file, but to the exe file (it shows up window's errors or something like that), you can try the second method "running the script...", described below.
running the script in WINDOWS & LINUX / UNIX
  1. In linux, Perl is always installed ;)
    In windows, you will need to install a Perl interpreter, for example ActivePerl:
    follow this link (You don't have to give your data if you don't want to, just click "continue"...)
    When you have finished installing it, continue to next step.
  2. Decompress all MBP_reader_v05c.zip files in the same FOLDER.
  3. Put a copy of your MBP FILE in that very same FOLDER.
  4. Open up a command-line console:
    In windows, a MS-DOS console.
  5. Situate the prompt in the FOLDER (cd... 'til reach FOLDER).
  6. Type:
    perl MBP_reader.pl MBP_FILE_NAME.mbp
    where "MBP_FILE_NAME.mbp" is the name of your mobipocket file (the one whith extension '.mbp' which are the ones that contains your notes) from which you want to extract the notes.
    Or, alternatively, type:
    perl MBP_reader.pl
    to extract notes from every file which resides in the FOLDER.
  7. If everything runs ok (maybe it won't, look contact below), all your notes will be in a text file(s) named after your original mbp files, plus a ".mbp_notes.txt" extension.
        If drawings exist in the mbp file, and the system has both the GD perl module and libgd libraries, they'll be exported to GIF images, named after the mbp file, plus a number and ".gif" extension.

  8.     In case of errors, they'll be reported in the file mbp.errors.txt. If some problem arises, you can send me an email with a description of your problem (idleloopyahoo.com).

so, can I export my kindle notes?

Kindle uses the same format as mobipocket for storing notes, so yes, you can export also your kindle notes...
How?
You have to find the ".mbp" files associted to your ebooks. You can find them in your Kindle while it's connected throu your USB, with a file explorer: they have the same name as your books, but a ".mbp" extension.
Also, some people have told me that they can be found in Windows at:
C:\Documents and Settings\User\My Documents\My Kindle Content
happy exporting!

Anyway, since 2010, it seems that amazon has set up a web page throu which notes can be viewed...

Kindle users WARNING:
I've been informed that Amazon has changed the way their reader stores notes since the end of October 2012, in reaction to a third-party application that gained some public relevance lately and that also exported notes.
They show explanations and a workaround on that application's site.
It seems that Amazon have crypted mbp files: now they're ".embp" (encrypted) or ".smbp" (secured) files.
This means that they effectively negate access to bookmarks info to any third party application.

MBP_reader cannot read these files. It just read "mbp" files.

I can assure I'm so sad as you for this unexpected turn of events, as user and also as programmer.
Kindle Hint:
Kindles books have a "clipping limit", that is, a maximum amount of allowed text that can be "copied". This limit seems to affect also the way notes are stored in ".mbp" files.
So, if you try to use my app, and the text file reports the number of notes, but nothing more, you'll probably need to remove that limit. If the limit is exceeded, notes are not stored as text, but as a pointer to the original book (?), and my app cannot cope with that.
This web explains how to do that:
www.mobileread.com forum thread    (external link)
In brief: you'll need the "mobi2mobi" program:
Download and use Mobi2Mobi on .azw, .mobi and .prc Books - Vista/XP    (external link)
I'm not sure if the graphic version can remove the limit. Anyway u can download it here:
How to use the Mobi2Mobi GUI on .azw, .mobi and .prc Books - Vista/XP    (external link)
Using the command line version, if your file is named "Book.azw", and the modified file is named "Book.2.azw", the command would be (well, I haven't test it by myself... read the link above if this doesn't work):
mobi2mobi "Book.azw" --outfile "Book.2.azw" --delexthtype ClippingLimit


Thanx to the users who noted this issue and solved it !

mbp file format

I've compiled my knowledge in a strange format, just in case someone out there can use it for the good of the humankind (or something like that):
mbp file format description [text format] (last update: 03/2012).
The info stated there contains errors... (I'm sure of that!).
In particular, the type of mbp files I've managed is very simple. More complex ones will pose new characteristics that I am sure are beyond this draft.
There're also a lot of unknown parts (marked with three points followed by the number of bytes for which I can't guess the meaning).

I think that there are more user marks types that I haven't parsed... there're 'bout 10 by now, and everytime I look, I see new ones... Since version 0.2.c (07/2008), unknown marks won't stop parsing the file, though they won't be showed in the text output.

I'm particulary *proud* of the 'reversing' of the mbp user drawing format ;)

Finally (2012) I noticed that text is encoded as UTF-16BE. Don't know how could I say all these years "big-endian-padded with zeros to a 16 bit limit" without noticing what that obviously was! Thanks a lot to all users who have sent me samples of their notes! This achievement is yours!

Perhaps new Kindles (Kindle Fire) store notes in mbp in a different format, which is just JSON, so readable. Since v0.4 mbp_reader can cope with this new format notes.

Does the program ends with an error with one of your mbp files?: send me it (if not confidential), and I'll try to improve the program...

CONTACT

Problems? suggestions? :
idleloopyahoo.com
Looking for new versions? :
uhmm... dunno, you may check this site in the future...
Wanna leave a bitcoin donation? 1GX726he5TNgnDuG4qG9zrM6CSN7uyga6F

HISTORY

Can you extract this notes to any other format?
In mobipocket forums, developers say that next versions of mobireader will have this functionality. I've been waiting for years. Unfortunately, I had a problem with a two-hundred-notes MBP file, which was corrupted (?) as I was reading a file... and I simply couldn't lost all that info:
I "had" to make this Perl program to try to patch my file. (In case you guess, yeah, I could patch it: it just had some bytes where it shouldn't ;)

VERSION HISTORY

Usually, each version upgrade upgrades also the mbp file format definition.
  • 0.5.c (11/2013)
    Patch: there can be two consecutive index entries pointing to the same note.
  • 0.5.b.1 (10/2013)
    only perl code retouched to eliminate obsolete "switch" statemet. Windows version untouched.
  • 0.5.b (06/2013)
    Adjusting value of SHOW_MARK_TYPE in mbp.parameters.txt will not print mark type descriptions.
  • 0.5.a (10/2012)
    Adjusting value of BKMK_PAGE_FACTOR in mbp.parameters.txt will print page locations. A self-explanatory "mbp.parameters.txt" file is created by this version if it doesn't exist.
  • 0.4.a (05/2012)
    Seems Kindle Fire stores notes in a different way. First approach.
  • 0.3.a (03/2012)
    International characters managed correctly (finally).
  • 0.2.f (11/2010)
    Corrected the mark detection algorithm. Again.
  • 0.2.e (12/2009)
    Corrected the mark detection algorithm to make it flexible enough to cope with not so well known bits.
  • 0.2.d (06/2009)
    Corrected a byte alignment detail that could have caused previous versions to provide no results. Additionally, format description was updated with a little ongoing work on text position extraction.
  • 0.2.c (07/2008)
    Ups, previous 0.2.b wasn't as flexible as I thought... fixed. Also, PUBLISHER mark recognized.
  • 0.2.b (06/27/2008)
    adds support for these tags: GENRE, ABSTRACT, and COVER. Flexible handling of unknown tags... hope this won't mess things up. Also, this way, broken MBP files won't be so easily patched... but, hey, anyway, probably I'm the only one in the world who patched a broken MBP file ;)))   (if you've also done it, let me know!).
  • 0.2.a (04/30/2008)
    Now it can export user drawings to GIF images!.
  • 0.1.d (04/23/2008)
    adds support for these tags: AUTHOR, TITLE, and CATEGORY. More flexible tagging for Notes.
  • 0.1.c (04/2008)
    adds BOOKMARKs parsing.
  • 0.1.b (04/2008)
    initial release.

LICENSE

Distributed under GPL 3.
(license text included in zip distribution file).

LINKS

www.mobipocket.com
www.mobipocket.com/forum/

en.wikipedia.org/wiki/Perl
perldoc.perl.org
www.activestate.com/store/activeperl/download/