This repository posts a random article from MDN Web Docs.
It is also a npm package exporting method randomMDN
.
For automatic posting, the GitHub Action is used,
see .github/workflows/scheduled-posts.yml
.
Inspired by Random MDN (@randomMDN) / Twitter.
You can find the bot on randomMDN (@randomMDN@front-end.social) - Front-End Social.
You can find the rss feed on front-end.social/@randomMDN.rss1.
- Instalation (for now for early adapters)
- latest lts version of NodeJS ⇒ for installation follow nvm-sh/nvm: Node Version Manager2
npm install https://github.com/jaandrle/randomMDN --location=global
- usage cli
>_:randomMDN --help Description This script posts a new random article from MDN¹ to a given mastodon instance. To post to the correct mastodon instance, use the `--url` and `--token` options. The script has been highly inspired by the similar project² for Twitter. [1] https://developer.mozilla.org/en-US/ [2] https://github.com/random-mdn/random-mdn-bot Usage $ randomMDN <command> [options] Available Commands json Print random article as JSON echo Print random article text Print random article as text – default mastodon Post to mastodon rss Prints RSS feed for beeing used for example in [Newsboat, an RSS reader](https://newsboat.org/). For more info, run any command with the `--help` flag $ randomMDN json --help $ randomMDN echo --help Options -v, --version Displays current version -h, --help Displays this message
- usage package:
import { randomMDN } from "randomMDN";
- random-mdn/random-mdn-bot: Serverless functions tweeting/sending/... random MDN articles
- A Beginner's Guide to the Mastodon API - Post a Status Update with cURL or Python - DEV Community
- Simple Mastodon bot in 100 lines.
Footnotes
-
FYI: Mastodon and RSS ↩
-
Alternatively
curl -sL install-node.vercel.app/lts | bash
↩