main.py 474 B

1234567891011121314151617181920212223
  1. from pathlib import Path
  2. from sys import argv
  3. from textwrap import dedent
  4. from themes.app import Themes
  5. def main():
  6. try:
  7. assert len(argv) == 2, f'usage : {argv[0].split("/")[-1]} {{file}}'
  8. path = Path(argv[1])
  9. assert path.is_file(), f'file not found : {path}'
  10. app = Themes(path)
  11. theme = app.run()
  12. print(theme)
  13. except Exception as x:
  14. print(f'''
  15. ! {x}
  16. ''')
  17. if __name__ == '__main__': main()