nit-tui 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
nit_tui/__init__.py ADDED
@@ -0,0 +1,2 @@
1
+ # SPDX-License-Identifier: Apache-2.0
2
+ """NIT school diary terminal application."""
nit_tui/__main__.py ADDED
@@ -0,0 +1,20 @@
1
+ # SPDX-License-Identifier: Apache-2.0
2
+ import argparse
3
+ import logging
4
+ from .app import DiaryApp
5
+
6
+
7
+ def main():
8
+ parser = argparse.ArgumentParser(description="NIT diary TUI (restores your remembered login)")
9
+ parser.add_argument("--demo", action="store_true", help="Open synthetic demo without accessing saved credentials or NIT")
10
+ parser.add_argument("--login", action="store_true", help="Open explicit NIT sign-in form")
11
+ args = parser.parse_args()
12
+ if args.demo and args.login:
13
+ parser.error("Choose --demo or --login.")
14
+ logging.getLogger("nit_tools").disabled = True
15
+ logging.getLogger("nit_tools").setLevel(logging.CRITICAL)
16
+ DiaryApp(login=not args.demo, auto_connect=not args.demo and not args.login).run()
17
+
18
+
19
+ if __name__ == "__main__":
20
+ main()