diff --git a/frontends/ycdl_flask/ycdl_flask_dev.py b/frontends/ycdl_flask/ycdl_flask_dev.py index 69a7f9e..ca04f6f 100644 --- a/frontends/ycdl_flask/ycdl_flask_dev.py +++ b/frontends/ycdl_flask/ycdl_flask_dev.py @@ -1,8 +1,29 @@ ''' +ycdl_flask_dev +============== + This file is the gevent launcher for local / development use. -Simply run it on the command line: -python ycdl_flask_dev.py [port] +> ycdl_flask_dev port + +port: + Port number on which to run the server. Default 5000. + +--dont-create: + If this flag is passed, YCDL will raise an error if there is not an + existing ycdl.db in the current directory. + +--https: + If this flag is not passed, HTTPS will automatically be enabled if the port + is 443. You can pass this flag to enable HTTPS on other ports. + We expect to find ycdl.key and ycdl.crt in frontends/ycdl_flask/https. + +--localhost-only: + If this flag is passed, only localhost will be able to access the server. + Other users on the LAN will be blocked. + +--refresh-rate X: + Starts a background thread that refreshes all channels once every X seconds. ''' import gevent.monkey; gevent.monkey.patch_all() @@ -11,6 +32,7 @@ import gevent.pywsgi import os import sys +from voussoirkit import betterhelp from voussoirkit import operatornotify from voussoirkit import pathclass from voussoirkit import vlogging @@ -97,8 +119,7 @@ def main(argv): parser.add_argument('--refresh_rate', '--refresh-rate', dest='refresh_rate', type=int, default=None) parser.set_defaults(func=ycdl_flask_launch_argparse) - args = parser.parse_args(argv) - return args.func(args) + return betterhelp.single_main(argv, parser, __doc__) if __name__ == '__main__': raise SystemExit(main(sys.argv[1:]))