diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..eedebdb --- /dev/null +++ b/setup.py @@ -0,0 +1,16 @@ +from setuptools import setup, find_packages + +setup( + name='wubloader', + version='0.0.1', + author='VST video cutting bot', + author_email='mikelang3000@gmail.com', + description=True, + packages=find_packages(), + install_requires=[ + 'argh', + 'gevent', + 'gspread', + 'oauth2client', + ], +) diff --git a/wubloader/__init__.py b/wubloader/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/wubloader/__main__.py b/wubloader/__main__.py new file mode 100644 index 0000000..b1097c5 --- /dev/null +++ b/wubloader/__main__.py @@ -0,0 +1,12 @@ + +import gevent.monkey +gevent.monkey.patch_all() + +import logging +logging.basicConfig(level='DEBUG') + +import argh + +from wubloader.main import main + +argh.dispatch_command(main) diff --git a/wubloader/main.py b/wubloader/main.py new file mode 100644 index 0000000..bfc28ff --- /dev/null +++ b/wubloader/main.py @@ -0,0 +1,14 @@ + +import logging + +# Verbose format but includes all extra info +LOG_FORMAT = "[%(asctime)s] %(levelname)s pid:%(process)d tid:%(thread)d %(name)s (%(pathname)s:%(funcName)s:%(lineno)d): %(message)s" + + +def main(conf_file, log_level='INFO'): + logging.basicConfig(level=log_level, format=LOG_FORMAT) + + with open(conf_file) as f: + config = json.load(f) + +