|# -*- coding: utf-8 -*-|
|clippings = 'My Clippings.txt'|
|ankiFile = 'AnkiImport.txt'|
|clippingsFile = open(clippings, 'r')|
|except IOError, e:|
|print '*** file open error: ', e|
|anki_import = open(ankiFile, 'w')|
|kindle_notes = clippingsFile.readlines()|
|anki_import.writelines(['"%s"\t"%s"\n\n' % (kindle_notes[i].strip(), kindle_notes[i+3].strip())|
|for i in range(0, len(kindle_notes), 5)])|
|if __name__ == '__main__':|
This is just a script running on computer to convert the kindle clippings file into a anki import file format. I need this script because I use anki to manage the kindle highlights/notes. You can't add it into your kindle, on contrary you copy the "My Clippings.txt" file to your computer.
Tell me what you want it to be, maybe I can make some improvements:) For now, it's just a script for personal use:)
To run this script, you have to have python installed in your pc. You put the script and the kindle clippings file (named "My Clippings.txt") under the same folder. After running the script (shell command: python kindle_anki.py), you will find a file named "AnkiImport.txt". That's the file to import into Anki.