marmots/config.py
Jeremy Penner 70a7844aae Fixes & cleanup
* fix pickling under greenlet
* allow overriding config with an external JSON file
* remove useless flashpolicy server (flash is sadly dead)
2020-06-28 10:32:13 -04:00

35 lines
1.1 KiB
Python

import json
import os
def override(fn):
with open(fn, 'rt') as f:
for k, v in json.load(f).iteritems():
globals()[k] = v
# Default configuration options follow - they can be overridden with a JSON file
# Port to run the telnet server on.
PORT_TELNET = 19999
# Port to run the command server on. Used to trigger saving.
PORT_CMDSERVER = 20002
# Hostname to bind servers on. Leave as "" for all.
BIND_HOSTNAME = ""
# width and height; default 80x25
W = 80
H = 25
# directory to save ANSI pictures to. leave as "." for current directory. no trailing slash required. "" == /
DIR_ANSI = "."
# authorization. Options are "Noop" (make up a username, no password), "Drupal" (fetches from MySQL Drupal database),
#"DrupalBcrypt" (fetches from MySQL Drupal database hacked to bcrypt the md5 hash - basically just Glorious Trainwrecks)
AUTH = "Noop"
# if Drupal, configure these options:
#drupaldb = "database"
#drupaldb_user = "user"
#drupaldb_password = "password"
#drupaldb_host = "localhost"
# Path to the object database to load / save
ODBPATH = "whiteboard.marm"