An easy file/message transfer tool using http file server.
$ go get github.com/monochromegane/hoi/...Download from the following url.
Or, you can use Homebrew (Only MacOSX).
$ brew tap monochromegane/hoi
$ brew install hoiYou can build a download url.
$ hoi hoge.txt
http://192.168.0.100:8081/tx1lrmkkqenh5fy0izbassidb9t9l1na/hoge.txthoi links the file to ~/.hoi/temp_public/random, and it's document root directory for hoi server.
$ hoi message1 message2
http://192.168.0.100:8081/tx1lrmkkqenh5fy0izbassidb9t9l1na/message.txthoi create a message file to ~/.hoi/temp_public/random, and it's document root directory for hoi server.
You can notify the url to Slack account.
$ hoi file|message @user
http://192.168.0.100:8081/tx1lrmkkqenh5fy0izbassidb9t9l1na/message.txt
Message sent successfully to @userHoi supports Slack API and takosan (a simple web interface to Slack).
hoi allows to change port number for hoi server
~/.hoi/conf.json
{
"port": 8082
}if you want to use notification for Slack:
{
"notification": {
"from": "YOUR SLACK ACCOUNT",
"to": "slack",
"token": "YOUR SLACK API TOKEN"
}
}or takosan:
{
"notification": {
"from": "YOUR SLACK ACCOUNT",
"to": "takosan",
"host": "TAKOSAN HOST NAME",
"port": TAKOSAN PORT NUMBER,
}
}$ hoi --clear- Add
hoi servercommands. (start|stop|status) - Add scheduler that clear public directory every some minutes.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request