Related:

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

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"
}