Giter Site home page Giter Site logo

commonsmisc's Introduction

commonsmisc

This repo contains some scripts for using with Commons mobile app, in future maybe other ways too. All scripts reside in https://tools.wmflabs.org/urbanecmbot/commonsmisc/, just append filename.

uploadsbyuser.py

This script return a single number representing number of total uploads of certain given user. This includes reuploads of files either uploaded by the same user or by somebody else.

Overview

feedback.py

This script returns various numbers about certain given user, like number of thanks they received or number of usages of their files at projects of the Wikimedia Foundation.

Overview

  • HTTP method: GET
  • Output - JSON
    • Keys are described below
    • status - string - ok or error, depending on successfullness of the request
    • labs - boolean, indicates if request was made with production (false) or beta (true) database
    • database - string, database that was queries (like "commonswiki" or "enwiki")
    • user - username of the user we're examining (you can use spaces or underscores, Martin Urbanec and Martin_Urbanec is the same)
    • errorCode - string - when status=="error", this described what actually happened, currently it may only be mustpassparams which means that not all mandatory parameters (see below) were passed to the script.
    • uniqueUsedImages - number - how many images was used in at least one article
    • articlesUsingImages - number - how many times was images uploaded by examined user used
    • thanksReceived - number - how many thanks have the user recieved
    • featuredImages - dictionary - how many images received particular award of Commons users
      • key is category name of the award, value is number of images that are in that category = received that award
    • deletedUploads - number - how many uploads uploaded by examined user was deleted
  • Parameters
    • user - mandatory - string - username of user you want to examine (you can use spaces or underscores, Martin Urbanec and Martin_Urbanec is the same)
    • fetch - optional - array; separated by | - values from the output that you want to receive - default value is calculate everything possible
    • db - optional - string - select other production database to be queried, cannot be used with labs
    • labs - optional - string - select beta/labs database to be queried, cannot be used with db
  • Example requests

commonsmisc's People

Contributors

urbanecm avatar maskaravivek avatar

Watchers

 avatar

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.