mirror of https://github.com/ekimekim/wubloader
Basic skeleton
parent
861fb4de17
commit
2c6495ffe1
@ -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',
|
||||||
|
],
|
||||||
|
)
|
@ -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)
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue