08-30-2011, 06:19 AM | #1 |
Connoisseur
Posts: 57
Karma: 10288
Join Date: Aug 2011
Location: West Sussex
Device: Kindle 3 - 3g, Samsung Galaxy Note
|
Clippings Parser
Hi all, this is my first application to do anything with the kindle.
I have written a library that will allow you to parse the "My Clippings.txt" file from your kindle devices. It is in its early stage of development but I have all ready written a small test application to print out the clippings as XML. This could be useful for importing into another application or for converting it to a more readable format. I have plans to expand this program in the future but development will be slow due to my job and studies. I will eventually develop a graphical interface that will allow the clippings to be organized and exported in a number of formats. I have uploaded the source for the library, the test application and the doxygen documentation. If you would like more please visit my website where I have uploaded the sources for everything and the library binaries. To run the test application simply run "java -jar ClippingsExtractor.jar <file>" on the command line/terminal. I hope this application will interest you and would love to hear your feedback and suggestions for what to put into the graphical interface. Edit: I have just uploaded the new version of the application which fixes the date issue. I have now moved away from using Java's built in date parser and written my own as it seems to be less problematic. Everything should work now, if not let me know and I'll fix it. Edit 2: New version uploaded, it should work now. Support for page numbers as well as locations now added. Thanks go to PoP for helping me debug this you've been a huge help. The GUI version of this is now under development and should be released soon, there is another thread in the Kindle forum for this if people want to discuss it. Last edited by wiccan2; 09-08-2011 at 06:43 AM. |
08-30-2011, 08:18 AM | #2 |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
Posts: 3,002
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
Tried with no luck, what should the <file> parameter be pointing at?
Spoiler:
|
Advert | |
|
08-30-2011, 08:47 AM | #3 |
Connoisseur
Posts: 57
Karma: 10288
Join Date: Aug 2011
Location: West Sussex
Device: Kindle 3 - 3g, Samsung Galaxy Note
|
The <file> parameter should be the path to the "My Clippings.txt" file.
e.g. "java -jar ClippingsExtractor.jar /home/My\ Clippings.txt" As this was just an initial proof of concept to show what the library could do I didn't add the code to handle all the exceptions correctly and instead just printed a stack trace which is what you relieved when you didn't enter the file path. Future versions will handle things better. This version was written over a couple of days in a short period of time after work each day and as such is not as complete as it could be. |
08-30-2011, 09:50 AM | #4 |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
Posts: 3,002
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
Close but no cigar yet:
Spoiler:
P.-S. I will be off the forum for a week and unable to further comment till then. Good luck. Last edited by PoP; 08-30-2011 at 09:51 AM. Reason: spelling |
08-30-2011, 10:03 AM | #5 |
Connoisseur
Posts: 57
Karma: 10288
Join Date: Aug 2011
Location: West Sussex
Device: Kindle 3 - 3g, Samsung Galaxy Note
|
It seems that the program is having trouble parsing the dates in your clippings file.
Would it be possible for you to upload your clippings file so that I can debug this further. If not i will try to use the information in the stack trace to debug as far as I can. Thank you for your help with this as I could never have caught errors like this on my own. |
Advert | |
|
08-31-2011, 04:52 AM | #6 |
Connoisseur
Posts: 57
Karma: 10288
Join Date: Aug 2011
Location: West Sussex
Device: Kindle 3 - 3g, Samsung Galaxy Note
|
Just an update for people on the progress of my debugging for the bug PoP found.
I have managed to recreate the error on my own computer. It seems that there may be some characters in the date string that are not displayed e.g. new line characters etc. I think that these were missed due to my initial development being on windows and not linux. The text file is created in linux which means it has different ways of generating new lines. I have clearly overlooked this fact as when I was initially developing the application I had copied the contents of my clippings file into a windows text file. I should be able to fix this issue tonight so expect another release either tonight or tomorrow. Also I have managed to get the application working on the kindle in a terminal. This could mean a release that runs on the kindle in the future. Once this bug is fixed I will start work on a graphical application, what kind of features would the community like to see in this application. I have seen that people want the clippings organized by books and that they would like to copy the text from a single clipping but what else. And finally thank you to Mario1up for putting this application in the Comprehensive List of Kindle Hacks. |
09-06-2011, 03:04 PM | #7 |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
Posts: 3,002
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
Thanks for your version 0.11, getting closer:
Spoiler:
Find attached my Clippings file in case you need it for debugging. Clippings.txt |
09-06-2011, 06:10 PM | #8 |
Connoisseur
Posts: 57
Karma: 10288
Join Date: Aug 2011
Location: West Sussex
Device: Kindle 3 - 3g, Samsung Galaxy Note
|
Thank you for uploading your clippings file it made debugging much easier.
I have fixed this issue now and your clippings file runs through the application fine now. The problem was being caused by some of your clippings having "Page" instead of "Loc.". I never knew that the clippings file could be structured like this as my file doesn't contain "Page". There are still some other issues at the moment so I won't be releasing an update until they are fixed. Expect an update sometime tomorrow. |
09-08-2011, 06:45 AM | #9 |
Connoisseur
Posts: 57
Karma: 10288
Join Date: Aug 2011
Location: West Sussex
Device: Kindle 3 - 3g, Samsung Galaxy Note
|
New version out now, see post 1.
Should be fixed now. As well as page support the clippings are now sorted by their start locations. |
09-08-2011, 07:18 AM | #10 |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
Posts: 3,002
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
Nice. Thank you wiccan2.
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Hello and my clippings won't sync | dave33 | Introduce Yourself | 5 | 11-19-2010 06:18 PM |
Organizing clippings | manda243 | Amazon Kindle | 8 | 11-02-2010 12:52 AM |
My Clippings | jsherwood | Amazon Kindle | 1 | 10-06-2010 04:07 PM |
Clippings anyone ? | Prince Hal | Astak EZReader | 4 | 02-20-2010 12:24 PM |
Parser can't identify form used for user/pass | Solari | Calibre | 3 | 03-01-2009 07:04 PM |