diff --git a/blinkclient.py b/blinkclient.py index 22be884..4db94f6 100755 --- a/blinkclient.py +++ b/blinkclient.py @@ -2,6 +2,7 @@ from socket_protocol import BlinkClient from blinkconfig import * import cmd +import sys class Prompt(cmd.Cmd): @@ -42,9 +43,15 @@ def do_show_clips(self, line): ret = connector.get_available_clips() print(ret) + def do_quit(self, line): + return True + def help_load_file(self): print("Reads a file and adds it to the list of available clips.") if __name__ == '__main__': - connector = BlinkClient(getstring("ethernet_host"), getint("ethernet_port")) + args = sys.argv[1:] + host = args[0] if len(args) > 0 else getstring("ethernet_host") + port = int(args[1]) if len(args) == 2 else getint("ethernet_port") + connector = BlinkClient(host, port) Prompt().cmdloop() diff --git a/blinkconfig.py b/blinkconfig.py index 1955d5f..fe3acc9 100644 --- a/blinkconfig.py +++ b/blinkconfig.py @@ -1,7 +1,7 @@ from collections import namedtuple from os.path import expanduser -VERSION = "1.0.7" +VERSION = "1.0.8" AUTHOR = "Christoph Hirtz" MAIL = "christoph.hirtz@online.de"