Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/soh335/gohn
https://github.com/soh335/gohn
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/soh335/gohn
- Owner: soh335
- Created: 2013-11-09T15:43:19.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-11-12T03:17:35.000Z (about 11 years ago)
- Last Synced: 2024-10-11T21:11:51.522Z (about 1 month ago)
- Language: Go
- Size: 168 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gohn
gohn is simple play youtube sound by http access tool. it is easy to hit a bell, "gohn".
## require
* go
* youtube-dl
* ffmpeg
* play sound command ( default is afplay )## example
```
$ go build
$ ./gohn --config eg/config.json --datadir eg/data #=> start 127.0.0.1:5555
$ curl 127.0.0.1:5555/play/miyazaki-aoi
```
## git commit hook```
$ echo "#/bin/sh\ncurl 127.0.0.1:5555/play/miyazaki-aoi" > .git/hooks/post-commit
$ chmod +x .git/hooks/post-commit
$ touch test
$ git add test
$ git ci -m 'add test'
```* http://hisaichi5518.hatenablog.jp/entry/2013/11/03/193719
## on network change
```
$ perl -MCocoa::EventLoop -MCocoa::NetworkChange -e 'on_network_change(sub{ system(qw|curl 127.0.0.1:5555/play/miyazaki-aoi-return-home|); }, sub{}); Cocoa::EventLoop->run;'
```