diff options
| author | 2025-12-08 20:23:39 +0100 | |
|---|---|---|
| committer | 2025-12-08 20:23:39 +0100 | |
| commit | d9cc5bc118249b1d1db894145e158290f5bd7dcd (patch) | |
| tree | fab968a0f32ad83665ba1daa565d30e97b71730f /config.py | |
| parent | user-config: fallback to '' to be able to run w/out auth (diff) | |
mwrepl: update to work with pywikibot
Diffstat (limited to 'config.py')
| -rw-r--r-- | config.py | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/config.py b/config.py deleted file mode 100644 index 88b07e7..0000000 --- a/config.py +++ /dev/null @@ -1,46 +0,0 @@ -import importlib, sys - -# default config file, copy the contents into local_config.py and modify -if __name__ == "local_config": - config = importlib.reload(sys.modules["config"]).config -else: - - class config: # dummy, so the local config can simply be a copy of this template - ... - - -class config(config): - class self: - name = "KleaBot" - source = "http://git.hollyhock.internal/u/klea/archiveteam" - gitdir = "./" - - class mediawikiAuth: - import os - login = False - username = "" - password = "" - if 'ATWIKIBOT_USERNAME' in os.environ and 'ATWIKIBOT_PASSWORD' in os.environ: - login = True - username = os.environ['ATWIKIBOT_USERNAME'] - password = os.environ['ATWIKIBOT_PASSWORD'] - - class admin: - ... - - class cmd: - ... - -# you can remove the following lines if you're editing local_config.py -if __name__ == "config": - try: - config = importlib.reload(sys.modules["local_config"]).config - except ModuleNotFoundError: - ... - #print("\x1b[31m!!! you should probably set up local config !!!\x1b[0m") - except KeyError: - try: - from local_config import config - except ModuleNotFoundError: - ... - #print("\x1b[31m!!! you should probably set up local config !!!\x1b[0m") |
