MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / main

Function main

Scripts/Developer Base/Mobile Desktop.py:2006–2048  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2004# Main
2005# ----------------------------
2006def main() -> None:
2007 cfg = load_config()
2008 if not ensure_termux_deps(cfg):
2009 return
2010
2011 while True:
2012 print("\n" + "=" * 76)
2013 print(tr(cfg, "title"))
2014 print("=" * 76)
2015
2016 menu_items = T[cfg.get("language","en")]["menu"]
2017 for i, item in enumerate(menu_items, 1):
2018 print(f"{i}) {item}")
2019
2020 choice = input("\n" + tr(cfg, "choose")).strip()
2021
2022 if choice == "1":
2023 action_install(cfg)
2024 elif choice == "2":
2025 action_remove_system(cfg)
2026 elif choice == "3":
2027 action_settings(cfg)
2028 elif choice == "4":
2029 action_vnc(cfg)
2030 elif choice == "5":
2031 action_x11(cfg)
2032 elif choice == "6":
2033 action_programs_install(cfg)
2034 elif choice == "7":
2035 action_programs_remove(cfg)
2036 elif choice == "8":
2037 action_update(cfg)
2038 elif choice == "9":
2039 action_extras_menu(cfg)
2040 elif choice == "10":
2041 action_launcher(cfg)
2042 elif choice == "11":
2043 action_help(cfg)
2044 elif choice == "12":
2045 break
2046 else:
2047 print(tr(cfg, "invalid"))
2048 pause(cfg)
2049
2050if __name__ == "__main__":
2051 main()

Callers 1

Mobile Desktop.pyFile · 0.70

Calls 15

printFunction · 0.85
inputFunction · 0.85
load_configFunction · 0.70
ensure_termux_depsFunction · 0.70
trFunction · 0.70
action_installFunction · 0.70
action_remove_systemFunction · 0.70
action_settingsFunction · 0.70
action_vncFunction · 0.70
action_x11Function · 0.70
action_programs_installFunction · 0.70
action_programs_removeFunction · 0.70

Tested by

no test coverage detected