Git Product home page Git Product logo

google / wikiloop-doublecheck Goto Github PK

View Code? Open in Web Editor NEW
79.0 9.0 58.0 38.08 MB

WikiLoop DoubleCheck: a web tool to help review Wikipedia edits easily and collaboratively.

Home Page: http://doublecheck.wikiloop.org

License: Apache License 2.0

JavaScript 10.75% Vue 32.29% TypeScript 56.53% Shell 0.29% SCSS 0.13% Procfile 0.02%
wikiloop wikipedia vandalism anti-vandalism counter-vandalism webapp nuxt vue fight-vandalism wikiloop-battlefield circleci

wikiloop-doublecheck's Introduction

WikiLoop DoubleCheck: Fight vandalism on Wikipedia together

All Contributors

WikiLoop Logo

Deploy

CircleCI GitHub watchers GitHub forkers GitHub stargazers GitHub followers

This is a web app project built to allow people to fight vandalism on Wikipedia collaboratively. See [[m:WikiProject_WikiLoop]] for more introduction. The documentation in this repository focuses on development of the software itself.

Vandalism Example

Website Status

Uptime Robot status Prod Site Uptime Robot ratio (30 days) Dev Uptime Robot status Dev Site Uptime Robot ratio (30 days)

Quick Start

GitHub GitHub contributors GitHub closed issues GitHub package.json version (branch) Tech Stack

We welcome contributions! See our contribution policy. Please check out our stack diagram to get familiar with the technologies we depend on.

Deploy a Dev Instance on Heroku

Deploy

Demo: Deploy to Heroku

Install

Prerequisite: git, nodejs, npm

git clone [email protected]:google/wikiloop-doublecheck.git
cd wikiloop-doublecheck
npm install 

Config environment variables

** If you don't intent to config environment variables you can skip this part, and skip to next section **

To configure more variables, you should create a dev.env file containing environment variables needed by this project used by dotenv. A template has been provided in the template.env. Once set, you should do cp template.env dev.env to create such file in the exact name, and then do

export DOTENV_PATH="dev.env"

Run

Prerequisite: NuxtJS with VueJS and ExpressJS.

To run a local dev instance, which gives you hot reload and a dev tool (Vue DevTool) friendly instance:

npm run dev

To build and run a local instance with like a prod:

npm run build
npm start

Test

Prerequisite: Docker, Jest

npm test

Continuous Integration

Prerequisite: CircleCI

We run our continuous integration with CircleCI. To run continuous integration locally:

circleci local execute build

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Add contributor through the following command

npx all-contributors add $NEW_CONTRIBUTOR translation

xinbenlv

πŸ“– πŸ’» 🌍 πŸ› πŸ–‹ πŸ€” πŸ“† βœ…

Ashwin Ramaswami

πŸš‡ πŸ’»

Hamdanil Rasyid

🌍 πŸ’» πŸ›

Ali GOREN

🌍 πŸ› πŸ’»

Elan

πŸ›

ExtremoBlando

πŸ›

ChaoyueFred

πŸ“Ή

Denny VrandečiΔ‡

πŸ›

Wisnu Adi Nurcahyo

πŸ›

curimit

πŸ›

Andrew G. West

πŸ’¬ πŸ”§

Martins Brunenieks

🌍

Florian KΓΆrner

πŸ’»

dz_s

πŸ’»

Bhavya Karia

🌍

Felipe Mobus

🌍

We greatly appreciate the following volunteers for helping us translate / proofread our (machine translated) texts.

  • ZH: @tzuhsiao
  • UK: @MT-Wizard, @adehtiarov
  • IT: @alex-martelli
  • ES: @apatronl, @fmobus
  • PT: @fmobus, @he7d3r, Ted Hardie,
  • JA: @luisfors-g, @renamoo
  • RU: Andrei Goriachev

This project follows the all-contributors specification. Contributions of any kind welcome!

wikiloop-doublecheck's People

Contributors

adehtiarov avatar alex-martelli avatar aligoren avatar antoinealb avatar apatronl avatar bhavyakaria avatar dependabot[bot] avatar dz-s avatar epicfaace avatar floriankoerner avatar fmobus avatar grovina avatar he7d3r avatar hrasyid avatar langner avatar luisfors-g avatar mt-wizard avatar nicolas-raoul avatar papuass avatar pgrimaud avatar renamoo avatar renovate-bot avatar sohomdatta1 avatar tzuhsiao avatar xinbenlv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wikiloop-doublecheck's Issues

FR: Support "On Demand" for a new RecentChangeCard.

Currently we only support auto feed. Therefore, we have less control of the speed. Sometimes it also happens when trying to mark a revision with a Judgement, it shows the next revision, and caused the judgement click on a mistaken card.

FR: Data migration `` wikiRevId = `${wiki}:${revId}` ``

We need to update the collection Interactions with an additional field of wikiRevId = ${recentChange.wiki}:${recentChange.revision.new}.

Here is a mongodb shell command to do so.

print("Start...");
db.getCollection("Interaction").find({}).forEach(function(doc) {
  doc.wikiRevId = doc.recentChange.wiki + ":" + doc.recentChange.revision.new;
  db.getCollection("Interaction").save(doc);
})
print("Done!");

Weekly Digest (29 May, 2019 - 5 June, 2019)

Here's the Weekly Digest for xinbenlv/learn-vue-nuxt:


ISSUES

Last week, no issues were created.


PULL REQUESTS

Last week, no pull requests were created, updated or merged.


COMMITS

Last week there were no commits.


CONTRIBUTORS

Last week there were no contributors.


STARGAZERS

Last week there were no stargazers.


RELEASES

Last week there were no releases.


That's all for last week, please πŸ‘€ Watch and ⭐ Star the repository xinbenlv/learn-vue-nuxt to receive next weekly updates. πŸ˜ƒ

You can also view all Weekly Digests by clicking here.

Your Weekly Digest bot. πŸ“†

FR: Suggestion from [User:Fuzheado]

Suggestion from User:Fuzheado:

  • It would be good to explain when mousing over the icons of faces and cloud what they mean. Right now all I see is "from WMF ORES score" and even though I'm familiar with ORES, I'm not sure what these mean.
  • If the username of the person who made the edit in question has no user page, it would be nice to display the name in red (See "User:Jkmistry17") because for vandal fighting, it helps to see whether the person editing is very new and a red userpage link helps in determining this.
  • I think I know what "Overriden" means (someone else has acted on it already) though this is a bit confusing. Perhaps a better or more detailed message here?
    Great work though. A really useful tool. -- Fuzheado | Talk 10:55, 9 July 2019 (UTC)

FR: Swap API and Storage to rely on `RevId` instead of `RecentChangeId`

Originally we use RecentChangeId because we directly store what we get from EventStream. But it turns out RecentChangeId is not very well supported by Action API to be queried. Instead, RevisionId is. So we want to switch to RevisionId to identify a revision.

In addition, the MediaWiki Wiki Farm relies on a wiki (such as enwiki) identifier to identify which wiki instance is. Therefore, a WikiId + RevisionId will uniquely identify a revision.

  • define schema location for wikiRevId
  • write to wikiRevId into the database
  • databasee migration: create a wikiRevId = `${wiki}:${revId}`
  • read and query from wikiRevId instead of _id, dbId etc.
  • rewrite _id to random generated id

FR: Improve Overriden message

I think I know what "Overriden" means (someone else has acted on it already) though this is a bit confusing. Perhaps a better or more detailed message here?
Great work though. A really useful tool. -- Fuzheado | Talk 10:55, 9 July 2019 (UTC)

From #26

B: Fix the edit summary

  1. Fix the version number, currently showing vundefined
  2. Change to "The tool's edit summary is also a bit off at the moment (containing "vundefined"), maybe it could be changed to a more descriptive "Identified as test/vandalism using [[m:WikiLoop Battlefield|WikiLoop]]"?"

FR: Fetch reverts conducted by WikiLoop Battlefield users from Wikipedia article public-available history

It should be possible for us to fetch the full list of revisions reversion and list of Wikipedia authors who used our tool to revert things directly from Wikipedia articles. For example

For example, in the page of [Crime_in_New_York_City](https://en.wikipedia.org/w/index.php?title=Crime_in_New_York_City&action=history Wikipedia article history shows

 2019-07-30T09:53:15β€Ž PerinPeron21 talk contribsβ€Ž  201,281 bytes -7β€Ž  Undid revision 908582516 by 69.127.235.116 (talk): Identified as test/vandalism using m:WikiLoop Battlefield(version 1.1.0-alpha-1) at battlefield.wikiloop.org. undothank Tag: Undo
 2019-07-30T09:52:41β€Ž 69.127.235.116 talkβ€Ž  201,288 bytes +7β€Ž  undo
  1. Get a list of all revisions. We have it in our own database MongoDB collection interaction
  2. With the full list of revisions, we can get the page titles of them by making request to MediaWIki Action API similar to this API call
    const fetchUrl = new URL(`${getUrlBaseByWiki(wiki)}/w/api.php`);
    let params = {
      "action": "query",
      "format": "json",
      "prop": "revisions|info",
      "indexpageids": 1,
      "revids": revIds.join('|'),
      "rvprop": "ids|timestamp|flags|user|tags|size|comment",
      "rvslots": "main"
    };
    Object.keys(params).forEach(key => {
      fetchUrl.searchParams.set(key, params[key]);
    });
    let retJson = await rp.get(fetchUrl, {json: true});
  1. With a full list of Revision -> Article Title mapping, we can get the full list of Articles being reverted by us. We can query the next revision after the revision we have (because our Revert only work for 1 immediate revision so it must be next one).

  2. For these revisions we can filter by comment Text and We can get UserName of them.

In summary this is a hacky-workaround of the following pseudo SQL query

SELECT revId, userName FROM WPRevisions
WHERE comment contains "wikiloop"

We can basically get a list of all our revisions being labeled as vandalism and proceed to make batch query to MediaWiki to get their subsequent revisions to find any comments that has our WikiLoop fingerprint.

Alternatives Solutions pending Feature Request at Wikipedia Instance / MediaWiki Software FR

Alternatively, we can ask the Wikipedia to allow we provide a tag filtering of WikiLoop Battlefield. Currently under approval https://phabricator.wikimedia.org/T226459

Also alternatively, we can ask the MediaWiki to provide revision querying with given text substring / ideally also RegEx. This can be easily provide through https://phabricator.wikimedia.org/T229361

FR: Allow change of judgement

Currently, for a revision, the judgement is a plain array. So when a user click on a button the second time, another judgement will be made to the same revision, from the same user.
We need to remove the previous judgement.

Add User info, red-link

If the username of the person who made the edit in question has no user page, it would be nice to display the name in red (See "User:Jkmistry17") because for vandal fighting, it helps to see whether the person editing is very new and a red userpage link helps in determining this.

Related to #26

FR: User Feedback: Language filter

I love using your tool, one possible improvement could be setting languages as filter, as I can be interested for example in reviewing English and Spanish edits, while ignoring the rest, and other users may have other language preferences.

Great work!

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.