Mastodon bot for sending Mastodon posts to Readwise. Check out my blog post for more details.
- A Mastodon account (I use and co-host pkm.social for free)
- A Readwise account (Here's an affiliate link)
- Familiarity with GitHub, the command line, Node.js
- Clone this repository.
- In your Mastodon account settings, go to the Development section for your Mastodon server (e.g.
https://pkm.social/settings/applications
) and click New Application. - Fill in the application name (this can be anything you want), leave everything else the same, and then click Save Changes.
- Click on the application you just created, and note your client key, client secret, and access token. You'll need these later.
- In this repository, copy the contents of
.env.sample
to a new file called.env
. - Fill out the fields in
.env
with the information you just obtained from your Mastodon account. - For the
READWISE_TOKEN
field, enter your Readwise access token. - For the
DOMAIN
field, enter your Mastodon server's domain (e.g.https://pkm.social
). - Run
npm install
to install the dependencies. - Run
node bot.js
to start the bot. - In Mastodon, find a post you like and reply to it with
@botname Your comment here.
Within a few minutes, the original post you replied to will be sent to your Readwise account as a highlight and your comment as a note.
(Optional) If you use Obsidian and you have the Readwise Official plugin installed and automatically syncing, the Mastodon posts you've replied to will show up in your Obsidian vault!
(Note: The exact formatting of the post will depend on your Readwise settings.)