Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jcatala/gqm
Go quick message
https://github.com/jcatala/gqm
Last synced: 3 months ago
JSON representation
Go quick message
- Host: GitHub
- URL: https://github.com/jcatala/gqm
- Owner: jcatala
- Created: 2020-09-04T05:00:03.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-25T18:44:03.000Z (almost 4 years ago)
- Last Synced: 2024-06-20T05:27:47.909Z (5 months ago)
- Language: Go
- Size: 26.4 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-hacking-lists - jcatala/gqm - Go quick message (Go)
README
# Go Quick Message (Telegram notification)
## Install
Remember to have the `$GOPATH/bin` on your `$PATH`
```bash
go get -u github.com/jcatala/gqm
mkdir ~/.config/gqm/
vim ~/.config/gqm/gqm.ini
```The config file must be something like this:
```yaml
apikey = YOUR TOKEN THAT BOTHFATHERS GIVES TO YOU
```The `gqm` will automatically update the `chat_id` on the config file, that must match the `last update` from the bot.
Sometimes the bot `does not have new updates`, so you can't rely on the `updates` to get the **chat id**, that's the reason why I save it on the config file.## Usage
```bash
$ gqm -h
Usage of gqm:
-debugInfo
To get debug information
-follow
To keep the stdin open
-markdown
Force markdown on the entire message, if is not, do it by yourself adding backquotes
-verbose
To be verbose```
## Use cases
```bash
# To get a response without markdown
echo "123 test without markdown" | gqm -verbose# To get a response with forced markdown
echo "123 test with markdown" | gqm -verbose -markdown# To make the stdin open to get constant updates
tail -f "dns.log" | grep --line-buffered "domain" | gqm -follow
```