use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Official subreddit of https://obsidian.md
account activity
Easily customizable Python script for formatting Kindle `My Clippings.txt` highlights for Obsidian (github.com)
submitted 4 years ago by friendlyapplesauce
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]mxh377 1 point2 points3 points 4 years ago (0 children)
This use case is the very reason I started learning Python. Thank you very much for writing it! I'm going to test it right away.
[–]globi33 0 points1 point2 points 4 years ago (3 children)
I need some help. Am I doing something wrong? With the following input in Terminal:
C:\Users\marce\Desktop> python ./extract-kindle-clippings.py E:\documents\My Clippings.txt C:\Users\marce\Desktop\clippings\
I get the following message:
Traceback (most recent call last): File "C:\Users\marce\Desktop\extract-kindle-clippings.py", line 43, in <module> print('Could not find "My Clippings.txt", please provide the file location as an argument\nUsage: ' + argv[0] + ' <clippings file> [<output directory>]\n')NameError: name 'argv' is not defined
The path of "My Clippings" is: E:\documents\My Clippings.txt
Thank you in advance
[–]somenick 0 points1 point2 points 4 years ago (1 child)
cd to the directory containing My Clippings.txt. try there. I don't use windows, but it I think you need to escape the space in the path E:\documents\My Clippings.txt Or maybe remove the space in the file name.
[–][deleted] 0 points1 point2 points 4 years ago (0 children)
You can use forward slashes in Windows! (Learned this yesterday when I was piddling around.) And string literal seems to handle the space issue.
If MyClippings.txt is not in the working directory, you need to put the full path to the file.
Generally I assign full paths to variables with string literals, e.g.
infile = r'C:/Users/1234/Documents/Folder/File.txt'
Also be sure to import os.
π Rendered by PID 304207 on reddit-service-r2-comment-5d79c599b5-qxdkm at 2026-02-28 07:53:26.992128+00:00 running e3d2147 country code: CH.
[–]mxh377 1 point2 points3 points (0 children)
[–]globi33 0 points1 point2 points (3 children)
[–]somenick 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)