Archived
1
0
Fork 0

style: Set max line to 120 chars in the README

Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
Julien Riou 2021-10-13 15:25:50 +02:00
parent e58fec37bb
commit ac0903cf9d
No known key found for this signature in database
GPG key ID: FF42D23B580C89F7

View file

@ -18,7 +18,8 @@ get **notified** when a **block** is mined, or farmed. We also like to keep trac
### Binaries
Go to [Releases](https://github.com/jouir/flexassistant/releases) to download the binary in the version you like (latest is recommended) into a `bin` directory.
Go to [Releases](https://github.com/jouir/flexassistant/releases) to download the binary in the version you like (latest
is recommended) into a `bin` directory.
Write checksum information to a local file:
@ -34,7 +35,8 @@ sha256sum -c flexassistant-VERSION-Linux-x86_64.sha256sum
### Compilation
You will need to install [Go](https://golang.org/dl/), [Git](https://git-scm.com/) and a development toolkit (including [make](https://linux.die.net/man/1/make)) for your environment.
You will need to install [Go](https://golang.org/dl/), [Git](https://git-scm.com/) and a development toolkit (including
[make](https://linux.die.net/man/1/make)) for your environment.
Then, you'll need to download and compile the source code:
@ -52,7 +54,8 @@ ls -l bin/flexassistant
## Configuration
*flexassistant* can be configured using a YaML file. By default, the `flexassistant.yaml` file is used but it can be another file provided by the `-config` argument.
*flexassistant* can be configured using a YaML file. By default, the `flexassistant.yaml` file is used but it can be
another file provided by the `-config` argument.
As a good start, you can copy the configuration file example:
@ -63,7 +66,8 @@ cp -p flexassistant.yaml.example flexassistant.yaml
Then edit this file at will.
Reference:
* `database-file` (optional): file name of the database file to persist information between two executions (SQLite database)
* `database-file` (optional): file name of the database file to persist information between two executions (SQLite
database)
* `max-blocks` (optional): maximum number of blocks to retreive from the API
* `max-payments` (optional): maximum number of payments to retreive from the API
* `pools` (optional): list of pools
@ -73,12 +77,14 @@ Reference:
* `address`: address of the miner or the farmer registered on the API
* `enable-balance` (optional): enable balance notifications (disabled by default)
* `enable-payments` (optional): enable payments notifications (disabled by default)
* `enable-offline-workers` (optional): enable offline/online notifications for associated workers (disabled by default)
* `enable-offline-workers` (optional): enable offline/online notifications for associated workers (disabled by
default)
* `telegram`: Telegram configuration
* `token`: token of the Telegram bot
* `chat-id` (optional if `channel-name` is present): chat identifier to send Telegram notifications
* `channel-name` (optional if `chat-id` is present): channel name to send Telegram notifications
* `notification-templates` (optional): path to [template](https://pkg.go.dev/text/template) files for each notification type
* `notification-templates` (optional): path to [template](https://pkg.go.dev/text/template) files for each notification
type
* `balance` (optional): path to template file to format balance notifications
* `payment` (optional): path to template file to format payment notifications
* `block` (optional): path to template file to format block notifications
@ -93,8 +99,10 @@ The following **functions** are available to templates:
* `lower(str string)`: convert string to lower case
* `convertCurrency(coin string, value int64)`: convert the smallest unit of a coin to a human readable unit
* `convertAction(coin string)`: return "Farmed" word for Chia coin or "Mined" for other coins
* `formatBlockURL(coin string, hash string)`: return the URL on the explorer website of the coin of the block identified by its hash
* `formatTransactionURL(coin string, hash string)`: return the URL on the explorer website of the coin of the transaction identified by its hash
* `formatBlockURL(coin string, hash string)`: return the URL on the explorer website of the coin of the block
identified by its hash
* `formatTransactionURL(coin string, hash string)`: return the URL on the explorer website of the coin of the
transaction identified by its hash
The following **data** is available to templates:
* balance: `.Miner`