kumistatus/twitter.py

19 lines
476 B
Python
Executable file

#!/usr/bin/env python3
import argparse, importlib, setuptools
p = argparse.ArgumentParser(description="Kumi Status Twitter Helpers")
for mod in setuptools.getListSetting("KumiStatus", "modules"):
try:
name = mod + ".twitter"
temp = importlib.import_module(name)
p.add_argument("--" + mod, "-" + temp.arg, action="store_const", const=temp)
except Exception as e:
print(e)
args = p.parse_args()
for arg in vars(args):
if vars(args)[arg]:
vars(args)[arg].run()