diff --git a/.gitignore b/.gitignore index 17ff478..ea8c4bf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1 @@ -*.pyc -*.egg -*.egg-info -.DS_Store -__pycache__ - -.earwigbot -logs/* -!logs/.gitinclude +/target diff --git a/LICENSE b/LICENSE index 68a6356..80f6101 100644 --- a/LICENSE +++ b/LICENSE @@ -1,11 +1,11 @@ -Copyright (c) 2009-2021 Ben Kurtovic +Copyright (c) 2009-2023 Ben Kurtovic Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. diff --git a/README.md b/README.md index 230bd66..664dde6 100644 --- a/README.md +++ b/README.md @@ -1,50 +1,6 @@ This is a [copyright violation](https://en.wikipedia.org/wiki/WP:COPYVIO) -detector running on [Wikimedia Cloud Services](https://copyvios.toolforge.org/). - -It can search the web for content similar to a given article, and graphically -compare an article to a specific URL. Some technical details are expanded upon -[in a blog post](https://benkurtovic.com/2014/08/20/copyvio-detector.html). - -Dependencies -============ - -* [earwigbot](https://github.com/earwig/earwigbot) >= 0.1 -* [flask](https://flask.palletsprojects.com/) >= 0.10.1 -* [flask-mako](https://pythonhosted.org/Flask-Mako/) >= 0.3 -* [mako](https://www.makotemplates.org/) >= 0.7.2 -* [mwparserfromhell](https://github.com/earwig/mwparserfromhell) >= 0.3 -* [oursql](https://pythonhosted.org/oursql/) >= 0.9.3.1 -* [requests](https://requests.readthedocs.io/) >= 2.9.1 -* [SQLAlchemy](https://www.sqlalchemy.org/) >= 0.9.6 -* [apsw](https://github.com/rogerbinns/apsw) >= 3.26.0 -* [uglifyjs](https://github.com/mishoo/UglifyJS) >= 3.12.6 -* [cssnano](https://github.com/cssnano/cssnano) >= 4.1.10 -* [postcss-cli](https://github.com/postcss/postcss-cli) >= 8.3.1 - -Running -======= - -- If using Toolforge, you should clone the repository to `~/www/python/src`, or - otherwise symlink it to that directory. A - [virtualenv](https://virtualenv.pypa.io/) should be created at - `~/www/python/venv`. - -- Install all dependencies listed above. - -- Create an SQL database with the `cache` and `cache_data` tables defined by - [earwigbot-plugins](https://github.com/earwig/earwigbot-plugins/blob/develop/tasks/schema/afc_copyvios.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: - - _copyviosSQL: - host: - db: - - If additional arguments are needed by `oursql.connect()`, like usernames or - passwords, they should be added to the `_copyviosSQL` section. - -- Run `./build.py` to minify JS and CSS files. - -- Start the web server (on Toolforge, `webservice uwsgi-python start`). +detector for Wikipedia articles, running on +[Wikimedia Cloud Services](https://en.wikipedia.org/wiki/Wikipedia:Wikimedia_Cloud_Services) +at [copyvios.toolforge.org](https://copyvios.toolforge.org/). It can search +the web for content similar to a given article, and graphically compare +an article to a specific URL. diff --git a/legacy/.gitignore b/legacy/.gitignore new file mode 100644 index 0000000..17ff478 --- /dev/null +++ b/legacy/.gitignore @@ -0,0 +1,9 @@ +*.pyc +*.egg +*.egg-info +.DS_Store +__pycache__ + +.earwigbot +logs/* +!logs/.gitinclude diff --git a/app.py b/legacy/app.py similarity index 100% rename from app.py rename to legacy/app.py diff --git a/build.py b/legacy/build.py similarity index 100% rename from build.py rename to legacy/build.py diff --git a/copyvios/__init__.py b/legacy/copyvios/__init__.py similarity index 100% rename from copyvios/__init__.py rename to legacy/copyvios/__init__.py diff --git a/copyvios/api.py b/legacy/copyvios/api.py similarity index 100% rename from copyvios/api.py rename to legacy/copyvios/api.py diff --git a/copyvios/attribution.py b/legacy/copyvios/attribution.py similarity index 100% rename from copyvios/attribution.py rename to legacy/copyvios/attribution.py diff --git a/copyvios/background.py b/legacy/copyvios/background.py similarity index 100% rename from copyvios/background.py rename to legacy/copyvios/background.py diff --git a/copyvios/checker.py b/legacy/copyvios/checker.py similarity index 100% rename from copyvios/checker.py rename to legacy/copyvios/checker.py diff --git a/copyvios/cookies.py b/legacy/copyvios/cookies.py similarity index 100% rename from copyvios/cookies.py rename to legacy/copyvios/cookies.py diff --git a/copyvios/highlighter.py b/legacy/copyvios/highlighter.py similarity index 100% rename from copyvios/highlighter.py rename to legacy/copyvios/highlighter.py diff --git a/copyvios/misc.py b/legacy/copyvios/misc.py similarity index 100% rename from copyvios/misc.py rename to legacy/copyvios/misc.py diff --git a/copyvios/settings.py b/legacy/copyvios/settings.py similarity index 100% rename from copyvios/settings.py rename to legacy/copyvios/settings.py diff --git a/copyvios/sites.py b/legacy/copyvios/sites.py similarity index 100% rename from copyvios/sites.py rename to legacy/copyvios/sites.py diff --git a/copyvios/turnitin.py b/legacy/copyvios/turnitin.py similarity index 100% rename from copyvios/turnitin.py rename to legacy/copyvios/turnitin.py diff --git a/logs/.gitinclude b/legacy/logs/.gitinclude similarity index 100% rename from logs/.gitinclude rename to legacy/logs/.gitinclude diff --git a/schema.sql b/legacy/schema.sql similarity index 100% rename from schema.sql rename to legacy/schema.sql diff --git a/scripts/log_analyzer.py b/legacy/scripts/log_analyzer.py similarity index 100% rename from scripts/log_analyzer.py rename to legacy/scripts/log_analyzer.py diff --git a/static/api.css b/legacy/static/api.css similarity index 100% rename from static/api.css rename to legacy/static/api.css diff --git a/static/api.min.css b/legacy/static/api.min.css similarity index 100% rename from static/api.min.css rename to legacy/static/api.min.css diff --git a/static/background.png b/legacy/static/background.png similarity index 100% rename from static/background.png rename to legacy/static/background.png diff --git a/static/script.js b/legacy/static/script.js similarity index 100% rename from static/script.js rename to legacy/static/script.js diff --git a/static/script.min.js b/legacy/static/script.min.js similarity index 100% rename from static/script.min.js rename to legacy/static/script.min.js diff --git a/static/style.css b/legacy/static/style.css similarity index 100% rename from static/style.css rename to legacy/static/style.css diff --git a/static/style.min.css b/legacy/static/style.min.css similarity index 100% rename from static/style.min.css rename to legacy/static/style.min.css diff --git a/static/toolinfo.json b/legacy/static/toolinfo.json similarity index 100% rename from static/toolinfo.json rename to legacy/static/toolinfo.json diff --git a/templates/api.mako b/legacy/templates/api.mako similarity index 100% rename from templates/api.mako rename to legacy/templates/api.mako diff --git a/templates/error.mako b/legacy/templates/error.mako similarity index 100% rename from templates/error.mako rename to legacy/templates/error.mako diff --git a/templates/index.mako b/legacy/templates/index.mako similarity index 100% rename from templates/index.mako rename to legacy/templates/index.mako diff --git a/templates/settings.mako b/legacy/templates/settings.mako similarity index 100% rename from templates/settings.mako rename to legacy/templates/settings.mako diff --git a/templates/support/footer.mako b/legacy/templates/support/footer.mako similarity index 100% rename from templates/support/footer.mako rename to legacy/templates/support/footer.mako diff --git a/templates/support/header.mako b/legacy/templates/support/header.mako similarity index 100% rename from templates/support/header.mako rename to legacy/templates/support/header.mako