RedditSaver Save

Automatically Download Saved Reddit Posts & Comments as Markdown Notes (into Obsidian)

Project README

redditSaver

Automatically Download Saved Reddit Posts & Comments as Markdown Notes (into Obsidian)

Sample output: image

Features

  • YAML Frontmatter is downloaded along with the markdown formatted note - supports using it with Dataview plugin (see below)
  • Notes are saved in reddit\<subreddit>\<note_title> hierarchy
  • Clickable link to the post/comment is added at the top of the note (besides being saved in Frontmatter)

Setup

  1. Go to this url and copy this link: image

  2. Copy settings.sample.json to settings.json and udpate these values:

    • jsonUrl : Put above copied link
    • rootPath : Your notes target path (use double forward slashes)
    • overWrite : If you wish to overwrite your existing note files with latest downloads, set this to 1
{
	"jsonUrl": "https://www.reddit.com/user/erohtar/saved.json?feed=xxxxxxxxx&user=erohtar",
	"rootPath": "C:\\ObsidianVault\\Reddit",
	"overWrite": 0
}
  1. Download (optionally portable) node.js and run redditSaver.js with it: <path>\node\node.exe redditSaver.js

  2. Done. Your notes should be created at the set path: <vault>\Reddit\<subreddit>\<title>__<id>.md

Dataview Example

image

Create a new note named redditSaver at the root of your Obsidian vault, and put this code there to get a nice table view of all your saved posts/comments:

```dataview
TABLE WITHOUT ID "[" + title + "](" + file.path + ")" AS "Title", type AS "Type", sub AS "r/"
FROM "Reddit"
SORT file.ctime DESC
```

Additional Notes

  • Reddit limits last 25 saved posts/comments in that feed
  • Scheduled running of this script once daily (or so) will keep your latest saves updated automatically
  • This is NOT an Obsidian plugin, and if someone wants to create one based on this idea or my code, they're more than welcome to
  • To save a reddit crosspost, go to the target post and save that instead of the link post (a habit I'll have to get into myself as well)
Open Source Agenda is not affiliated with "RedditSaver" Project. README Source: erohtar/redditSaver
Stars
51
Open Issues
2
Last Commit
11 months ago
Repository
License

Open Source Agenda Badge

Open Source Agenda Rating