diff options
| author | Ben Winston | 2022-03-30 22:52:34 -0400 |
|---|---|---|
| committer | Ben Winston | 2022-03-30 22:52:34 -0400 |
| commit | 30659a5c80f64fc5d31551bbb2b8f2528059ee93 (patch) | |
| tree | 55c7eac86b3bcad79f421bfcbac38a7759327af5 /roku-cli.py | |
| parent | eab16b636940c6eab91dc4a3be6ebe948069b882 (diff) | |
add entry point for package
Diffstat (limited to 'roku-cli.py')
| -rwxr-xr-x | roku-cli.py | 7 |
1 files changed, 5 insertions, 2 deletions
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() |
