summaryrefslogtreecommitdiff
path: root/mp-tool
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2016-12-29 03:19:19 +0100
committerYves Fischer <yvesf-git@xapek.org>2016-12-29 03:20:49 +0100
commit17a3e144dd0b0675bb994d082d1f50abde9e03da (patch)
tree794fe6871e42aa598db4c778333479bc5cc90407 /mp-tool
parent4e07f8306c855be768d435baac68f14a6bca547b (diff)
downloadmp-tool-17a3e144dd0b0675bb994d082d1f50abde9e03da.tar.gz
mp-tool-17a3e144dd0b0675bb994d082d1f50abde9e03da.zip
put/get via webrepl
Diffstat (limited to 'mp-tool')
-rwxr-xr-xmp-tool8
1 files changed, 6 insertions, 2 deletions
diff --git a/mp-tool b/mp-tool
index 1419089..f1823fc 100755
--- a/mp-tool
+++ b/mp-tool
@@ -31,9 +31,11 @@ if __name__ == '__main__':
parser_repl.add_argument("--password")
parser_put = subparsers.add_parser("put", help="Send file over websocket")
- parser_put.set_defaults(func=lambda a: import_module('mp_tool.web').put(a.WEBSOCKET, a.password, a.CODE))
+ parser_put.set_defaults(func=lambda a: import_module('mp_tool.web').put(a.WEBSOCKET, a.password, a.FILE, a.TARGET))
parser_put.add_argument("WEBSOCKET", help="Websocket address (e.g. ws://ESP_E1278E:8266)")
parser_put.add_argument("--password")
+ parser_put.add_argument("FILE", help="Filename")
+ parser_put.add_argument("TARGET", nargs='?', help="remote target path/filename")
parser_put_serial = subparsers.add_parser("put-serial", help="Send file over serial")
parser_put_serial.set_defaults(func=lambda a: import_module('mp_tool.serial').put(a.port, a.FILE, a.TARGET))
@@ -42,8 +44,10 @@ if __name__ == '__main__':
parser_put_serial.add_argument("TARGET", nargs='?', help="remote target path/filename")
parser_get = subparsers.add_parser("get", help="Load file over websocket")
- parser_get.set_defaults(func=lambda a: import_module('mp_tool.web').get(a.WEBSOCKET, a.password))
+ parser_get.set_defaults(func=lambda a: import_module('mp_tool.web').get(a.WEBSOCKET, a.password, a.FILE, a.TARGET))
parser_get.add_argument("WEBSOCKET", help="Websocket address (e.g. ws://ESP_E1278E:8266)")
+ parser_get.add_argument("FILE", help="Filename")
+ parser_get.add_argument("TARGET", nargs='?', help="local target path/filename")
parser_get.add_argument("--password")
parser_get_serial = subparsers.add_parser("get-serial", help="Get file over serial")