Converts MediaWiki [[links]] and {{templates}} to links, informs important events from wiki, handles announces review queue, and under review, and handles when they last saw a given user.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Agastya 8c0744604e
SASL
7 months ago
.gitignore initial commit 11 months ago
LICENSE initial commit 11 months ago
README.md Update readme for enwnbot2 9 months ago
config.js SASL 7 months ago
index.js SASL 7 months ago
package.json initial commit 11 months ago
utils.js bug fix: avoid crashing whe article not-ready'd 7 months ago
yarn.lock initial commit 11 months ago

README.md

Converts MediaWiki links and {{templates}} to links, informs important events from wiki, handles announces review queue, and under review, and handles when they last saw a given user.

Installation

To run this project, run the following commands after cloning it.

cd <DIR>
yarn # or `npm i`
yarn start # or `npm run start`

Configuration

Use the config.js to configure the bot. It expects the following variables:

  • channels: the channels the bot should join.
  • ircBotName: IRC username of the bot.
  • ircServer: IRC server.
  • RCAPI: Wiki's stream for recent changes.
  • RQAPI: API endpoint to get review queue.
  • URAPI: API endpoint to get under review articles.
  • URL: This is URL of a wiki page sans the title. (see below)
  • wiki: the wiki identifier used to filter the recent changes stream.

Sample config.js looks like:

module.exports = {
  channels: ["#my-wiki-channel", "##wiki-informal-channel"],
  ircBotName: "wikilinkbot",
  ircServer: "chat.freenode.net",
  RCAPI: "https://stream.wikimedia.org/v2/stream/recentchange",
  RQAPI: "https://en.wikinews.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:Review&format=json&cmsort=timestamp&cmprop=timestamp|ids|title",
  URAPI: "https://en.wikinews.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:Under%20review&format=json&cmsort=timestamp&cmprop=title|timestamp",
  URL: "https://en.wikinews.org/w/index.php?title=",
  wiki: "enwikinews"
};

Note: In case if you do not want the wikilinks and templates in your message to be be announced by the bot, add --ignore at the end of the message.

To access Review Queue, and articles under review, send this message in the channel: <ircBotName> !RQ and <ircBotName> !UR respectively.

To find when was a user last active in a channel, send @seen <username> in that channel.