Related:
- Clipper - Medium Template
- Clipper - Export and Import Templates
- Clipper - Wikipedia Template
- Clipper - YouTube Timestamp Template
- Clipper - URL Only Template
- Clipper - X (Twitter) Template
- Clipper - YouTube Template
Clipper - Reddit Template
Need help with importing/exporting templates?
Here is a step-by-step guide: Clipper - Export and Import Templates
And here is a full tutorial for the Obsidian Web Clipper.
Download
Get all my Obsidian Web Clipper templates for free.
Use
For this template to work, you need to open a specific Reddit post. It does not work when you are viewing the feed.
Effect
This template
- creates a new note
- gets triggered when viewing a Reddit post
- pre-fixes the note title with the current date
- E.g.: "2024-11-13 REDDIT Is it possible to move the New Note, New Folder, Sort and Collapse buttons so they sit next to the Files icon in the left side panel"
- Adds properties and values taken from the post
- Adds the first comment to the note content
Code
{
"schemaVersion": "0.1.0",
"name": "Reddit Post",
"behavior": "create",
"noteContentFormat": "> Posted in **{{selector:shreddit-post?subreddit-prefixed-name}}** by *{{selector:shreddit-post?author}}* at {{selector:shreddit-post?created-timestamp|date:\"YYYY-MM-DDTHH:mm:ssZ\"}} (⬆️ {{selector:shreddit-post?score}})\n\n\n# {{selector:shreddit-post?post-title|trim}}\n\n{{selectorHtml:shreddit-post > div[class=\"text-neutral-content\"]|markdown}}\n\n{{selector:zoomable-img > img?src|image}}\n\n## Comments ({{selector:shreddit-comment-tree?totalcomments}})\n### First Comment\n#### {{selector:shreddit-comment-tree > shreddit-comment?author|first}}:\n> {{selector:shreddit-comment-tree > shreddit-comment > div[slot=comment]|first}}",
"properties": [
{
"name": "url",
"value": "{{url}}",
"type": "text"
},
{
"name": "title",
"value": "{{selector:shreddit-post?post-title|trim}}",
"type": "text"
},
{
"name": "subreddit",
"value": "{{selector:shreddit-post?subreddit-prefixed-name}}",
"type": "text"
},
{
"name": "tags",
"value": "clippings, reddit",
"type": "multitext"
},
{
"name": "published",
"value": "{{selector:shreddit-post?created-timestamp|date:\\\"YYYY-MM-DDTHH:mm:ssZ\\\"}}",
"type": "date"
},
{
"name": "created",
"value": "{{time|date:\\\"YYYY-MM-DDTHH:mm:ssZ\\\"}}",
"type": "date"
}
],
"triggers": [
"/^https:\\/\\/www.reddit.com\\/r\\/\\w+\\/comments/"
],
"noteNameFormat": "{{selector:shreddit-post?created-timestamp|date:\"YYYY-MM-DD\"}} REDDIT {{selector:shreddit-post?post-title|trim|safe_name}}",
"path": "00 Inbox/Clippings"
}