Skip to content

JJMC89/copypatrol-backend

Repository files navigation

pre-commit.ci status tests Code style: black

back end bot for CopyPatrol

configuration

~/.copypatrol.ini

general

  • configured in the [copypatrol] section
  • url-ignore-list-title: title of the wiki page with the ignore list
  • user-ignore-list-title: title of the wiki page with the ignore list

sites

  • each site is configured in a [copypatrol:<domain>] section.
  • keys:
    • enabled (boolean): site is enabled (default: false)
    • namespaces (comma-separated list of namespace numbers): namesapces to monitor (default: 0)
    • pagetriage-namespaces (comma-separated separated list of namespace numbers): mark in PageTriage

example

[copypatrol]
url-ignore-list-title = example-url-title
user-ignore-list-title = example-user-title

[copypatrol:en.wikipedia.org]
enabled = true
namespaces = 0,2,118
pagetriage-namespaces = 0,118

[copypatrol:es.wikipedia.org]
enabled = true
namespaces = 0,2

[copypatrol:fr.wikipedia.org]
enabled = false

environment variables

  • CPB_ENV: dev or prod
  • CPB_DB_DATABASE: database name1
  • CPB_DB_DEFAULT_CHARACTER_SET: database default character set1
  • CPB_DB_DRIVERNAME: name of the database backend (corresponds to a module in sqlalchemy/databases or a third party plug-in), e.g., mysql+pymysql or sqlite
  • CPB_DB_HOST: database host1
  • CPB_DB_PASSWORD: database user password1
  • CPB_DB_PORT: database port number1
  • CPB_DB_USERNAME: database user1
  • CPB_TCA_DOMAIN: domain of the TCA URL
  • CPB_TCA_KEY: TCA key
  • CPB_TCA_WEBHOOK_DOMAIN: domain of the TCA webhook2
  • CPB_TCA_WEBHOOK_SIGNING_SECRET: secret for TCA to sign the webhook payload2

pywikibot

see user-config.py

licensing

Wikipedia content used for tests is available under CC BY-SA. see Wikipedia:Copyrights for details. see the histories of Kommet, ihr Hirten and Basil Lee Whitener for attribution. content may be edited to remove markup and content available in a prior revision.

everything else in this repository is available under the MIT license.

Footnotes

  1. as needed depending on your database 2 3 4 5 6

  2. required only when using a webhook 2