From 30659a5c80f64fc5d31551bbb2b8f2528059ee93 Mon Sep 17 00:00:00 2001 From: Ben Winston Date: Wed, 30 Mar 2022 22:52:34 -0400 Subject: add entry point for package --- roku-cli.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'roku-cli.py') diff --git a/roku-cli.py b/roku-cli.py index e41574d..5312631 100755 --- a/roku-cli.py +++ b/roku-cli.py @@ -159,7 +159,7 @@ def remote_loop(stdscr, remote): elif c == 'q': break -def main(stdscr, ip): +def main(stdscr, config): init_curses() stdscr.clear() @@ -207,9 +207,12 @@ def init_run(config_file): with open(str(config_file), 'w') as cf: config.write(cf) -if __name__ == '__main__': +def startup(): config_file = Path('~/.config/roku/roku.config').expanduser() if not config_file.exists(): init_run(config_file) config = RokuConfig(config_file) curses.wrapper(main, config) + +if __name__ == '__main__': + startup() -- cgit v1.2.3