Read-only unofficial Reddit plug-in for Roam Research. It's intended to pull a select number of posts at a time from one or more subreddit(s) of your chosing into your daily notes page, or the currently focused page/block.
Useful for subreddits like from r/lifeprotips
, r/todayilearned
, or your own favorites.
The easiest way to access the plugin's features is via the Command Palette. First put your cursor where you want the blocks to be inserted. Then just press Cmd+P
(Ctrl+P
on Windows) and start typing "Reddit" to see a list of supported commands.
There are two ways of installing roam-reddit-unofficial into your Roam graph. Unless you're a developer, the best option is to install it through the official Roam Depot (once it has been approved there).
To install the plug-in manually, follow these steps:
- Check out this repo to a local folder on your hard disk.
- Open the Settings panel and select "Roam Depot" on the left-hand side.
- Click on the gear icon on the right side of the "Installed Extensions" section, then click "Enable developer mode" in the drop-down menu.
- Click on the folder icon that has a plus sign on the right side of the "Developer Extensions" section that appears.
- Navigate to the folder containing this repo's source code.
- Notice that a new settings section for the plugin appears on the left sidebar.
The following settings are supported:
- Subreddits: Specify the subreddits(s) you'd like to pull posts from, separated by commas. (Required.)
- Sort: Select the sorting order, which should be one of the supported sorting options on Reddit itself (e.g. top, rising, new, random, etc.). (Optional, defaults to Rising.)
- Number of posts: The number of posts to retrieve for each subreddit. (Optional, defaults to 1.)
- Hashtag: A custom keyword to tag each block with, so that you can locate all the Reddit content in your graph. A value like "#roam-reddit" works well. This value is also used together with the
group
setting (see below). (Optional, defaults to#reddit-unofficial
.) - Group: Toggle this option to nest all inserted posts under a parent node. The content of the root node will be the hashtag if it is present. (Optional, defaults to true.)
- Title only: Toggle this option to only pull in the title of the post (rather than the title and body together. (Optional, defaults to false.)
- Blocked words: A comma-separated list of filter words. (Optional, defaults to none.)
- Minimum upvotes: The minimum votes a post must have received to be included in the filter. (Optional, defaults to zero.)
I developed this plug-in in my free time because (a) I wanted to learn and (b) it's useful to my everday workflow. I can't promise any support, but if you encounter any issues, feel free to open an issue on GitHub anyway, and if I have time I'll respond.
If you do submit an issue, please include the logs (see "technical troubleshooting" for instructions below).
In the future, I'd love to add the ability to draft and submit Reddit posts directly from within Roam.
The code is thoroughly instrumented with debug logs, but they won't be immediately visible in the Developer Tools -> Console window. To reveal them, first open the developer tools in your Chromium-based browser, then make sure the "Verbose" level is checked on the right hand side of the Console tab.