05-11-2012, 03:08 PM | #1 |
Junior Member
Posts: 3
Karma: 10
Join Date: May 2012
Device: Onyx M92
|
Quick and dirty script to export annotation text into PDFs
Hi all,
I've written a script for boox devices to attach the text of annotations into a PDF. Unfortunately the information stored in the database is not enough to easily export the highlights as well, but this script attaches a note with your comments on each page you make the comments on - hopefully better than nothing :-). You can also use it to just print out a list of all your annotations. The script currently works on the Mac and Linux (well, I haven't tested on linux, but it should work provided you have ghostscript installed). I'll get it working on windows over the course of the next few days. I've only tested on the M92, but I assume the DB format is the same for other boox devices. If not, I should be able to fix it reasonably easily :-). I know the M92 is getting a proper export feature soon, but I hope this is useful in the interim and for earlier devices. To use, just download and unzip, then read the README! |
05-12-2012, 02:02 AM | #2 |
Mono
Posts: 699
Karma: 13333
Join Date: Jan 2012
Device: Boox M92
|
Thanks!
Just for curiosity. How much work was it to programm? Separately DB structure analysis and programming? |
Advert | |
|
05-12-2012, 03:02 AM | #3 |
Junior Member
Posts: 3
Karma: 10
Join Date: May 2012
Device: Onyx M92
|
Once I'd found where the databases are kept the DB bit didn't take too long: the main challenge was the fact that the structure of the database is really wacky. The annotation table goes something like | ID | Page Number | Binary field containing a bunch of annotation data for that page | - so you can't easily extract just the information you're interested in using SQL.
Actually extracting the information from the DB probably took less than an hour, but working out a reliable way to extract just the annotation text from the binary field probably a smidge under another half day. Then probably about half a day to write the script. So about a day total, probably. edit: plus an embarrassingly long time to figure out where the database was actually stored. Because the file path is so similar to where the books are stored, I kinda skipped over it when looking, and ended up scratching my head for a while. Last edited by Zaltys; 05-12-2012 at 03:07 AM. |
05-12-2012, 10:46 AM | #4 |
Mono
Posts: 699
Karma: 13333
Join Date: Jan 2012
Device: Boox M92
|
Thanks for sharing the info. It is what I roughly expected...
You proved that it is not much work for Onyx to implement it. |
05-12-2012, 01:47 PM | #5 |
Junior Member
Posts: 3
Karma: 10
Join Date: May 2012
Device: Onyx M92
|
In fairness to them, I think exporting the highlights is the hardest bit - they won't have written the PDF viewing software that comes with the device, and if that software doesn't handle exporting for them it might be quite a lot of work - and they might not want to put out a halfway-solution like this.
|
Advert | |
|
05-13-2012, 05:54 PM | #6 | |
M92 info archivist
Posts: 238
Karma: 1398
Join Date: Jun 2008
Device: IRex Iliad 2nd ed., Onyx Boox M92, Onyx Boox Max Lumi
|
Quote:
...btw.: what I'd find _very_ useful would be the inverse - a script extracting annotations (of a merged pdf, or one edited by other applications) and putting it into the database so it can be edited by the naboo_reader on the M92. Cheers! |
|
07-16-2012, 10:10 AM | #7 | |
Junior Member
Posts: 1
Karma: 10
Join Date: Jul 2012
Device: Icarus eXcel
|
Icarus Excel
Quote:
1. Will the script also work for the Icarus Excel, as far as I know, the successor of the Onyx M92? 2. When and where can I get a windows version? |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PRS-650 prs 650 notes annotation export pdf | bjrnfrdnnd | Sony Reader | 8 | 03-10-2011 12:19 AM |
export annotation, add note on Neo | langmarp | BeBook | 2 | 06-28-2010 08:50 AM |
annotation export bebook neo | langmarp | Calibre | 0 | 06-25-2010 11:36 AM |
Quick n' dirty Ruby Program: convert text files (Kindle - others?) | monojohnny | Reading and Management | 5 | 01-14-2009 08:32 AM |
Dirty PDFs and the Kindle | Austin | Amazon Kindle | 5 | 03-26-2008 10:47 PM |