# Twitter credentials
CONSUMER_KEY = ''
CONSUMER_SECRET = ''
ACCESS_KEY = ''
ACCESS_SECRET = ''
# base path
BASE_PATH = os.path.dirname(__file__)
# pid path
PID_PATH = BASE_PATH+'/elmot.pid'
# people nicknames who can manage system
AUTHORIZED_ACCOUNTS = []
# logfile
LOG_PATH = BASE_PATH+'/log/elmot.log'
ERROR_LOG_PATH = BASE_PATH+'/log/elmot.err'
# type None to disable incoming message log
INCOMING_MESSAGE_LOG = BASE_PATH+'/log/incoming.log'
# run elmot as user (do not use root)
RUN_UID = pwd.getpwnam("root").pw_uid
class Plugin(object):
name = 'undefined'
keyword = 'undefined'
# actions:
# 0 - silent
# 1 - private message
# 2 - tweet to timeline
action = 2
controlled = True
def __init__(self):
print '*', self.name, 'loaded'
def execute(self, message):
pass
# run method only for non controlled plugins
# for threading support with python Threads
def run():
pass
Source: https://habr.com/ru/post/127788/