A copyright violation detector running on Wikimedia Cloud Services https://tools.wmflabs.org/copyvios/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Ben Kurtovic 6aaa7a236b
Merge pull request #72 from ChlodAlejandro/main
3 週之前
.github/workflows Tweak slightly and regenerate uv lock 2 月之前
i18n Localisation updates from https://translatewiki.net. 1 月之前
logs Always have a log dir. 12 年之前
scripts Initial Python 3 conversion 5 月之前
src/copyvios Only enforce login on action=search 1 月之前
.gitignore Add localization support 2 月之前
.pre-commit-config.yaml Bump ruff/pyright versions 5 月之前
LICENSE Initial Python 3 conversion 5 月之前
Makefile Update Makefile 5 月之前
README.md Bump earwigbot to fix import bug and get pre-commit working 5 月之前
app.py Set Cache-Control on static files with a version tag 5 月之前
pyproject.toml Tweak slightly and regenerate uv lock 2 月之前
schema.sql Store more in history table 2 月之前
tool_translations_config.py Add a fallback for pms -> it 1 月之前
uv.lock Bump nltk from 3.10.1 to 3.10.3 in the uv group across 1 directory 1 月之前

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.