diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-04-13 18:40:35 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2020-04-14 08:46:54 +0000 |
| commit | 1a8debe87762072b3a63b769aa515ebf63b4c70d (patch) | |
| tree | 33b42866307d11d2c0878b23e0ec0bb8925d3fcc /bin/alv | |
| parent | spec base.match __tostring (diff) | |
| download | alive-1a8debe87762072b3a63b769aa515ebf63b4c70d.tar.gz alive-1a8debe87762072b3a63b769aa515ebf63b4c70d.zip | |
move into proper Lua module (`alv`)
Diffstat (limited to 'bin/alv')
| -rwxr-xr-x | bin/alv | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -0,0 +1,23 @@ +#!/usr/bin/env moon +import Copilot, Logger from require 'alv' +import sleep from require 'system' + +arguments, key = {} +for a in *arg + if match = a\match '^%-%-(.*)' + key = match + arguments[key] = true + elseif key + arguments[key] = a + key = nil + else + table.insert arguments, a + +Logger.init arguments.log + +assert arguments[1], "no filename given" +copilot = Copilot arguments[1] + +while true + copilot\tick! + sleep 1 / 1000 |
