Code Monkey home page Code Monkey logo

contentreviewlog's Introduction

ContentReviewLog

Discord webhook relay of changes to review status of Fandom scripts, mostly intended for use on Dev Wiki's Discord server. Based on polling. Demonstration.

Installation

To install required packages, run:

$ npm install

Configuration

To run the configuration wizard for ContentReviewLog, run:

$ npm run-script config

Alternatively, create a JSON file with the following contents:

{
    "username": "Fandom username",
    "password": "Fandom password",
    "interval": 20000,
    "id": "1234",
    "token": "abcd",
    "wiki": "dev",
    "domain": "wikia.com"
}

Where the keys mean:

  • username: Fandom username of a user that's supposed to log in.
  • password: Password for the Fandom user that is supposed to log in,
  • interval: Amount of miliseconds between checks.
  • id: Discord webhook ID.
  • token: Discord webhook token.
  • wiki: Fandom wiki domain.
  • domain: Can be either wikia.com, fandom.com or wikia.org.
  • lang: Language in the article path.
  • debug: Whether more output should be logged.

Running

To run ContentReviewLog after having it configured, use:

$ npm start

Updating

To update ContentReviewLog to latest version, use:

$ npm run-script update

contentreviewlog's People

Contributors

dependabot[bot] avatar dorumin avatar kockaadmiralac avatar lgtm-com[bot] avatar lunartwilight avatar puxlit avatar

Stargazers

 avatar

Watchers

 avatar  avatar

contentreviewlog's Issues

Notification about constant request failures

ContentReviewLog doesn't need to attempt to retry HTTP requests as it reattempts them afterwards anyways, but if the HTTP requests are constantly failing it needs a way to notify users about it so proper action can be taken, either via a separate webhook or the same one (in the latter case error logging should be reduced to a single message with no important details about the error).

Diff links are missing `oldid`s

For the awaiting and rejected statuses, Wikia generates diff links with the live revision as the diff's base (i.e. oldid). This behaviour is particularly helpful when reviewing changes that span multiple revisions, and should be replicated.

For approved statuses, information about the previous live revision is lost, so a useful diff link cannot be constructed (without maintaining state). Wikia's behaviour is to generate a permalink (oldid without diff). To avoid confusion, this behaviour should also be replicated.

Trimmed amount of embeds

Discord trims the amount of embeds to around 20, so if over 20 scripts are approved at once only the first 20 (alphabetically) will appear.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.