- updated version to 0.6
- switched to argparse from getopts, renamed some arguments
- removed call-home from main.lua, fixed timer
- added --verbose option to show debugging (defaults to off)
- added code comments, fixed some grammar, updated README
- chmod 755'd the script so its runnable on POSIX
- checked with nodemcu 0.9.4 20141222
edit: made a 0.6.1 PR to put the old short versions of the arguments back and flush the serial port before closing to fix an issue on macosx.
./luatool.py --restart
->file.open("main.lua", "w") -> ok
->file.close() -> ok
->file.remove("main.lua") -> ok
->file.open("main.lua", "w+") -> ok
->file.writeline([[tmr.alarm(0, 1000, 1, function()]]) -> ok
->file.writeline([[if wifi.sta.getip() == nil then]]) -> ok
->file.writeline([[print("Connecting to AP...")]]) -> ok
->file.writeline([[else]]) -> ok
->file.writeline([[print('IP: ',wifi.sta.getip())]]) -> ok
->file.writeline([[tmr.stop(0)]]) -> ok
->file.writeline([[end]]) -> ok
->file.writeline([[end)]]) -> ok
->file.flush() -> ok
->file.close() -> ok
->node.restart() -> ok
--->>> All done <<<---
4refr0nt wrote:Now, you can migrate to my new project - ESPlorer
ESPlorer looks very neat (thanks!), but I think there's lot of benefits to a command line utility. The fact that this is Python and thus runs on every platform is a huge plus. It's also easy to integrate with other scripts.