Updated 03132023-114507
here's a #Shortcut for #Drafts that allows you to save whole Mastodon threads in markdown. :) https://routinehub.co/shortcut/14498
This shortcut uses the statuses endpoint of the Mastodon API to gather the contents (along with the created_at
and url
variables) of a single Mastodon post and all of its "descendants." It converts the HTML result of the content
variable to markdown format via native Shortcuts actions, converts the created_at
value for each post to davodtime, and combines the converted results of the original (top, target) post followed by that of any replies in chronological order.
By default, the format of the original post (which includes a standard HTML embed):
{markdown content}
- **@username** - [davodtime](url)
<iframe src="{url}/embed" class="mastodon-embed" style="max-width: 100%; border: 0" width="400" allowfullscreen="allowfullscreen"></iframe><script src="https://static-cdn.{instanceurl}/embed.js" async="async"></script>
...and of each descendant post:
---
{markdown content}
- **@username** - [davodtime](url)
An example result can be viewed via this GitHub Gist.