I want to used shortcuts to clip D&D magic items from Reddit.
Magic item posts usually come as image posts so I would want to grab the Title, images (could be multiple images), Reddit poster for metadata, first comment and preferably it’s formatting. And parse it as so.
I would want to download the images and put them into an attachments folder
I did a quick search and found lots of list and description posts, but not ones that match your use case.
Can you post a few links to some standard examples?
I’m thinking you would use the share sheet from Reddit to trigger the shortcut. The shortcut grabs the page, extracts the images and then parses the HTML for the first comment and the author data. These then get saved to files, in the formats described, in your Obsidian vault.
The vault location is potentially a point of contention. Shortcuts can currently only save within certain locations and if your vault is elsewhere then you would need something like Toolbox Pro to enable folder bookmarking as a workaround. But IOS15, due for release relatively soon, will natively address this limitation.
So I have done loads of digging and have found out these things.
When you have a Reddit link (I.e. /r/[subreddit]/[post name]/) you can add .json, and you get a big messy JSON of all the post info. So currently, I am parsing this.
The structure of the JSON berries differently if it is a gallery post and if it is just a single image post. So I am having to create a load of If/then statements.
Thank you, your shortcut is awesome I am going to study this and see what you are Doing. I am impressed. I am making this same thing, and the progress is slow(a keyboard and mouse would help, but I am traveling).
Your use of a text template and the set up dictionary are good. Is there a way to save in another folder other than the shortcuts folder. I am doing it with ToolboxPro.
Yes, ToolBox Pro would help you with that. First you make a Folder Bookmark to your Vault or the folder on your vault where you want to save these markdown files.