goalarm

module
v0.0.0-...-8b95d60 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2020 License: MIT

README

goalarm

Goalarm run alarm server. It receive a command, and a response its status.

This was made to work with other tools. By using this tool, you can use alarm on other tool without managing alarm logic.

Dependencies

https://github.com/hajimehoshi/oto#prerequisite

install

$ go get github.com/komem3/goalarm/cmd/goalarm

The plugin using this

https://github.com/komem3/goalarm.el

Usage

$ goalarm -h
Usage of goalarm:
  -describe
    	Describe command or status.
  -file string
    	Path of sound file.
  -hour int
    	Wait hour.
  -loop
    	Loop Alarm.
  -min int
    	Wait minute.
  -routine string
    	Alarm routine. Format is json array. [{"range":20,"name":"working"},{"range":5,"name":"break"}]
  -sec int
    	Wait second.
  -time string
    	Call time.(15:00:01)
  -v	Ouput verbose.
Examples
5 min timer
$ goalarm -file ./bell.mp3 -min 5
15 o'clock alarm
$ goalarm -file ./bell.mp3 -time 15:00:00
looping 5 min timer
$ goalarm -file ./bell.mp3 -min 5 -loop
get time from alarm server by get command
$ goalarm -file ./bell.mp3 -min 5
get
{"status":"running","left":"4m58s","error":"","task":{"index":0,"range":"5m0s","name":"alarm"}}
describe commands and statuses.
$ goalarm -describe command
$ goalarm -describe status
start routine
$ goalarm -file ./bell.mp3 -routine '[{"range":20,"name":"working"},{"range":5,"name":"break"}]'

In the above case, after a 20-minute timer named woriking runs, a 5-minute timer named break runs.

Author

komem3

License

MIT

Directories

Path Synopsis
cmd
internal
log

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL