A copyright violation detector running on Wikimedia Cloud Services https://tools.wmflabs.org/copyvios/
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
Nemoralis 7adb7abc44
Update UA email
il y a 4 mois
.github/workflows Remove cv-cached class il y a 4 mois
i18n Fix lego messages il y a 4 mois
logs Always have a log dir. il y a 12 ans
scripts Initial Python 3 conversion il y a 5 mois
src/copyvios Update UA email il y a 4 mois
.gitignore Add localization support il y a 4 mois
.pre-commit-config.yaml Bump ruff/pyright versions il y a 5 mois
LICENSE Initial Python 3 conversion il y a 5 mois
Makefile Update Makefile il y a 5 mois
README.md Bump earwigbot to fix import bug and get pre-commit working il y a 5 mois
app.py Set Cache-Control on static files with a version tag il y a 5 mois
pyproject.toml Fix CI il y a 4 mois
schema.sql Update SQL schema il y a 5 mois
tool_translations_config.py Fix lego messages il y a 4 mois
uv.lock Fix CI il y a 4 mois

README.md

This is a copyright violation detector web tool for Wikipedia articles running on Wikimedia Cloud Services at copyvios.toolforge.org.

It can search the web for content similar to a given article, and graphically compare an article to specific URLs. Some technical details are expanded upon in a blog post, though much of it is outdated.

Installation

  • If using Toolforge, clone the repository to ~/www/python/src, or otherwise symlink it to that directory.

  • Create a virtual environment and install the dependencies. On Toolforge, this should be in ~/www/python/venv, otherwise it can be in a subdirectory of the git project named .venv:

    python3 -m venv .venv
    . .venv/bin/activate
    pip install -e .
    
  • If you intend to modify CSS or JS, install the frontend dependencies:

    npm install -g uglify-js cssnano postcss postcss-cli
    
  • Create an SQL database with the tables defined by schema.sql.

  • Create an earwigbot instance in .earwigbot (run earwigbot .earwigbot). In .earwigbot/config.yml, fill out the connection info for the database by adding the following to the wiki section:

    copyvios:
      oauth:
        consumer_token: <oauth consumer token>
        consumer_secret: <oauth consumer secret>
      sql:
        engine: mysql
        host: <hostname of database server>
        db: <name of database>
    

Running

  • Run make to minify JS and CSS files after making any frontend changes.

  • Start your WSGI server pointing to app:app. For production, uWSGI or Gunicorn are likely good options. For development, use flask run.