python api for request and display random VDM from vdm.com. Display can be do with multiple library : i3, qt, gtk, etc ...
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
864B

  1. #!/usr/bin/env python
  2. import sys
  3. if __name__ == "__main__":
  4. from VDMAPI.Display.console import console as display
  5. if "-d" in sys.argv:
  6. index = next(i for i, c in enumerate(sys.argv) if c == "-d")
  7. if len(sys.argv) > index+1:
  8. displayType = sys.argv[index+1]
  9. if displayType == "i3":
  10. from VDMAPI.Display.i3 import i3 as display
  11. elif displayType == "tkinter":
  12. from VDMAPI.Display.tkinter import tkinter as display
  13. elif displayType == "kivy":
  14. from VDMAPI.Display.kivyDisplay import kivyApp as display
  15. d = display()
  16. d.run()
  17. sys.exit()
  18. elif displayType == "console":
  19. pass
  20. else:
  21. print("Error bad display mode accepted value are : i3, tkinter, kivy of console")
  22. sys.exit()
  23. else:
  24. print("Error too few argument -d need value : i3, tkinter, kivy of console")
  25. sys.exit()
  26. d = display()
  27. d.render()