enwnbot2

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.
git clone http://git.hanabi.in/repos/enwnbot2.git
Log | Files | Refs | README | LICENSE

README.md (1958B)


      1 <!-- adapted from https://github.com/acagastya/enwnbot/blob/master/README.md -->
      2 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.
      3 
      4 # Installation
      5 
      6 To run this project, run the following commands after cloning it.
      7 
      8 ```sh
      9 cd <DIR>
     10 yarn # or `npm i`
     11 yarn start # or `npm run start`
     12 ```
     13 
     14 # Configuration
     15 
     16 Use the `config.js` to configure the bot.  It expects the following variables:
     17 
     18 - `channels`: the channels the bot should join.
     19 - `ircBotName`: IRC username of the bot.
     20 - `ircServer`: IRC server.
     21 - `RCAPI`: Wiki's stream for recent changes.
     22 - `RQAPI`: API endpoint to get review queue.
     23 - `URAPI`: API endpoint to get under review articles.
     24 - `URL`:  This is URL of a wiki page sans the title.  (see below)
     25 - `wiki`: the wiki identifier used to filter the recent changes stream.
     26 
     27 Sample `config.js` looks like:
     28 
     29 ```js
     30 module.exports = {
     31   channels: ["#my-wiki-channel", "##wiki-informal-channel"],
     32   ircBotName: "wikilinkbot",
     33   ircServer: "chat.freenode.net",
     34   RCAPI: "https://stream.wikimedia.org/v2/stream/recentchange",
     35   RQAPI: "https://en.wikinews.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:Review&format=json&cmsort=timestamp&cmprop=timestamp|ids|title",
     36   URAPI: "https://en.wikinews.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:Under%20review&format=json&cmsort=timestamp&cmprop=title|timestamp",
     37   URL: "https://en.wikinews.org/w/index.php?title=",
     38   wiki: "enwikinews"
     39 };
     40 ```
     41 
     42 **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.
     43 
     44 To access Review Queue, and articles under review, send this message in the channel: `<ircBotName> !RQ` and `<ircBotName> !UR` respectively.
     45 
     46 To find when was a user last active in a channel, send `@seen <username>` in that channel.