<metaname="description"content="pynit is a personal archival script that relies on pinboard.in. it pulls in posts through the reddit api (by way of praw) and adds them to the linked pinboard account. you can get it here"/>
<metaproperty="og:description"content="pynit is a personal archival script that relies on pinboard.in. it pulls in posts through the reddit api (by way of praw) and adds them to the linked pinboard account. you can get it here"/>
{"mainEntityOfPage":{"@type":"WebPage","@id":"http://localhost:4000/projects/2019/06/23/pynit.html"},"description":"pynit is a personal archival script that relies on pinboard.in. it pulls in posts through the reddit api (by way of praw) and adds them to the linked pinboard account. you can get it here","@type":"BlogPosting","url":"http://localhost:4000/projects/2019/06/23/pynit.html","headline":"pynit","dateModified":"2019-06-23T00:00:00-05:00","datePublished":"2019-06-23T00:00:00-05:00","@context":"http://schema.org"}</script>
<p>pynit is a personal archival script that relies on <codeclass="highlighter-rouge">pinboard.in</code>. it pulls in posts through the reddit api (by way of <codeclass="highlighter-rouge">praw</code>) and adds them to the linked <codeclass="highlighter-rouge">pinboard</code> account. you can get it <ahref="https://github.com/jowj/pynit"title="pynit">here</a></p>
peruse comments (usually, the most useful part of the reddit entry)
find something that i want to revist
save it for later inside of reddit
forget about it forever, maybe revisit it within 3 months if i'm very bored
in the interim, many of the comments are deleted, links don't work, parent URL points to a dead webserver
</code></pre></div></div>
<p>this is obviously not ideal. pynit helps me with about half of those problems. specifically, because i pay for <codeclass="highlighter-rouge">pinboard</code>’s archiving service, i can preserve the context in the comment section of the reddit entry. links may still be broken, but i’m perfectly fine with using archive.org for viewing the links later if i need to. as i mentioned, comments end up being the most useful thing to me most of the time.</p>
<p>it should be noted that <codeclass="highlighter-rouge">pinboard</code> can be used to archive the parent URL context as well, but i opted not to do that in order to preserve some semblance of readability in my <codeclass="highlighter-rouge">pinboard</code> feed.</p>
<p>comments are also possible to be preserved through things resavr, ceddit, removeddit, etc. these type of sites go down regularly and are not very reliable in my experience (although resavr looks promising, if limited. it only archives comments that are deleted that are > 1000 characters).</p>
<p>now whenever i want to revisit a particular item i have all the comments preserved via pinboard, and URLs can be usable (most of the time) through archive.org.</p>
<p>i learned a few things that i want to write up here, all related to python or working with rest apis:</p>
<h2id="python">python</h2>
<p>i learned about <ahref="https://github.com/cool-RR/PySnooper">pysnoop</a> through <ahref="https://github.com/mrled/">@mrled</a> and it was SO useful. there may be more ways to use it (read their github page, its got great examples), but i primarily used it by decorating a function i wanted to inspect, like:</p>
<p>this allowed me to simple add a single line to an exist function /without modifying the function itself at all/ and make sure I was actually doing what I thought I was doing. this was huge for letting me sanity check my work.</p>
<h2id="rest-apis">rest apis</h2>
<p>a lot of people (a lot of people!!) just have you use get requests instead of posts, even when you’re posting stuff. i am not a Web Man, so i don’t understand the why, but if all you’ve ever done is /read/ about working with rest apis then the real world may be confusing when you try and post something that requires a get request. <ahref="https://pinboard.in/api">pinboard api docs</a> for instance require get requests when you mean posts for backwards compatibility with the <codeclass="highlighter-rouge">delicious</code> api.</p>