Coder Social home page Coder Social logo

google / wikiloop-doublecheck Goto Github PK

View Code? Open in Web Editor NEW
79.0 9.0 58.0 38.4 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

wikiloop-doublecheck's Issues

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: 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!");

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!

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.

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: 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

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: 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.

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. 📆

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.