|
|
@ -37,7 +37,8 @@ def servelet(server):
|
|
|
|
logging.info('Starting WSGI server.')
|
|
|
|
logging.info('Starting WSGI server.')
|
|
|
|
server.serve_forever()
|
|
|
|
server.serve_forever()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@argh.arg('channel',
|
|
|
|
|
|
|
|
help="Twitch channel to transcribe.")
|
|
|
|
@argh.arg('--host',
|
|
|
|
@argh.arg('--host',
|
|
|
|
help='Address or socket server will listen to. Default is 0.0.0.0 (everything on the local machine).')
|
|
|
|
help='Address or socket server will listen to. Default is 0.0.0.0 (everything on the local machine).')
|
|
|
|
@argh.arg('--port',
|
|
|
|
@argh.arg('--port',
|
|
|
@ -49,7 +50,7 @@ def servelet(server):
|
|
|
|
help='The start time in UTC for the event, for UTC-Bustime conversion')
|
|
|
|
help='The start time in UTC for the event, for UTC-Bustime conversion')
|
|
|
|
@argh.arg('--base-dir',
|
|
|
|
@argh.arg('--base-dir',
|
|
|
|
help='Directory from which segments will be grabbed. Default is current working directory.')
|
|
|
|
help='Directory from which segments will be grabbed. Default is current working directory.')
|
|
|
|
def main(database="", host='0.0.0.0', port=8010, bustime_start=None, base_dir=None):
|
|
|
|
def main(channel, database="", host='0.0.0.0', port=8010, bustime_start=None, base_dir=None):
|
|
|
|
if bustime_start is None:
|
|
|
|
if bustime_start is None:
|
|
|
|
logging.error("Missing --bustime-start!")
|
|
|
|
logging.error("Missing --bustime-start!")
|
|
|
|
exit(1)
|
|
|
|
exit(1)
|
|
|
@ -62,7 +63,7 @@ def main(database="", host='0.0.0.0', port=8010, bustime_start=None, base_dir=No
|
|
|
|
logging.error("Invalid --bustime-start!")
|
|
|
|
logging.error("Invalid --bustime-start!")
|
|
|
|
exit(1)
|
|
|
|
exit(1)
|
|
|
|
|
|
|
|
|
|
|
|
app.segments_dir = base_dir
|
|
|
|
app.segments_dir = os.path.join(base_dir, channel, "source")
|
|
|
|
|
|
|
|
|
|
|
|
app.db_manager = DBManager(dsn=database)
|
|
|
|
app.db_manager = DBManager(dsn=database)
|
|
|
|
|
|
|
|
|
|
|
|