A Janet script to download your Mastodon bookmarks as local markdown files and media
Go to file
2024-06-25 15:40:28 +02:00
.gitignore Release 2024-06-23 22:19:04 +02:00
dataview-query.js Release 2024-06-23 22:19:04 +02:00
image1.png Release 2024-06-23 22:19:04 +02:00
image2.png Release 2024-06-23 22:19:04 +02:00
LICENSE Release 2024-06-23 22:19:04 +02:00
main.janet Removed logs and don't overwrite existing markdown files 2024-06-24 19:05:37 +02:00
project.janet Renamed project 2024-06-23 10:49:43 +02:00
README.md Update README.md 2024-06-25 15:40:28 +02:00
utils.janet Removed logs and don't overwrite existing markdown files 2024-06-24 19:05:37 +02:00

Mastodon Bookmarks Archive

A small Janet script to archive all your Mastodon bookmarks in Markdown files.

Because Mastodon posts can disappear for a variety of reasons (deletion, defederation, server instance shutdown, ...), it is safer to archive your bookmarks.

Each Markdown file will contain:

  • A link to the original post
  • The author's handle
  • The post's content in HTML
  • The media attachments locally downloaded
  • If available, the alt text for each media
  • The full thread, if applicable
  • The link card, if any

Most of these values will be in the form of key:: value for easy integration with Obsidian's plugin Dataview. A sample script is available here

Build & Run

Pre-requirements

# Required by the httprequest dependency
$ sudo apt install libcurl4-openssl-dev
  • Clone this repository
  • Install Janet and jpm https://janet-lang.org/
  • Get an access token for your Mastodon account


Run

# Install dependencies locally with -l (--local)
$ jpm deps -l
# Tell jpm that our dependencies are local, before starting the script
$ jpm -l janet main.janet YOUR_INSTANCE YOUR_APP_TOKEN

The YOUR_INSTANCE value must not have the trailing slash (e.g: https://hachyderm.io)

Build for release

$ jpm build -l

LICENSE

Licensed under GPL-3.