kindle-clippings
                                
                                
                                
                                    kindle-clippings copied to clipboard
                            
                            
                            
                        A simple python script to extract clippings from 'My Clippings.txt', organize, store and output them in a more elegant way.
Fixed the bug: a bytes-like object is required, not 'str', which caused by python3.
Hello, your script helped me a lot, but I encountered some errors in the process of using json dump,I tried to modify to fix it
For each book, a dict X is created using a string of the clip position as key. Then clips are written for each pos in sorted(X), so that e.g. "3748"...
``` Traceback (most recent call last): File "kindle.py", line 94, in main() File "kindle.py", line 89, in main save_clips(clips) File "kindle.py", line 70, in save_clips json.dump(clips, f) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/__init__.py", line...
The script doesn't process the whole file. Output folder has only few notes. [My Clippings.txt](https://github.com/lxyu/kindle-clippings/files/4817837/My.Clippings.txt)
I had a lot of books that had a ":" character in the title Can be fixed by changing line 51 to: `filename = os.path.join(OUTPUT_DIR, u"%s.txt" % book.replace(":", ""))`
[io.open](https://docs.python.org/2/library/io.html#io.open) is the default open implementation in Python3 . The API support specified encoding when we opening a file , so we don't need encoding string manually before writing operation....
* Fixed the book titles with invalid characters bug (Issue #7) * Create the output dir if it does not exist (Issue #10) * Made some others changes (Running Python...
Documents can have titles split with a newline, currently the script assumes the title is a single line so it does not find the Location in the expected line. Maybe...
Highlights have data like "Location 1513-1514" but notes can look like "Location 1514" so these are not picked up by the script. Maybe a regex like 'Location (\d+)' instead of...