mirror of
https://github.com/nikolaydubina/calendarheatmap.git
synced 2025-03-04 16:15:45 +02:00
better readme
This commit is contained in:
parent
5eb73ee499
commit
dd242befbd
10
README.md
10
README.md
@ -44,7 +44,13 @@ img := charts.NewHeatmap(charts.HeatmapConfig{
|
|||||||
|
|
||||||
Example script,
|
Example script,
|
||||||
```
|
```
|
||||||
$ go build; ./calendarheatmap -h
|
$ go build
|
||||||
|
|
||||||
|
$ ./calendarheatmap -input testdata/basic.json -output basicjson.png
|
||||||
|
|
||||||
|
$ ./calendarheatmap -input testdata/custom.txt -output custom.png -input-format row-day-seconds-count
|
||||||
|
|
||||||
|
$ ./calendarheatmap -h
|
||||||
|
|
||||||
Usage of ./calendarheatmap:
|
Usage of ./calendarheatmap:
|
||||||
-colorscale string
|
-colorscale string
|
||||||
@ -52,7 +58,7 @@ Usage of ./calendarheatmap:
|
|||||||
-input string
|
-input string
|
||||||
file should contain lines in format: 2020-05-16 20:43 PPPP (default "input.txt")
|
file should contain lines in format: 2020-05-16 20:43 PPPP (default "input.txt")
|
||||||
-intput-format /parsers
|
-intput-format /parsers
|
||||||
format of input file (json-basic) refer to /parsers for examples (default "row-day-seconds-count")
|
format of input file refer to /parsers for examples (default "json-basic")
|
||||||
-labels
|
-labels
|
||||||
labels for weekday and months (default true)
|
labels for weekday and months (default true)
|
||||||
-monthsep
|
-monthsep
|
||||||
|
BIN
calendarheatmap
BIN
calendarheatmap
Binary file not shown.
2
main.go
2
main.go
@ -25,7 +25,7 @@ func main() {
|
|||||||
colorScale := flag.String("colorscale", "PuBu9", "refer to colorscales for examples")
|
colorScale := flag.String("colorscale", "PuBu9", "refer to colorscales for examples")
|
||||||
labels := flag.Bool("labels", true, "labels for weekday and months")
|
labels := flag.Bool("labels", true, "labels for weekday and months")
|
||||||
outputFormat := flag.String("output-format", "png", "output format (png, jpeg, gif)")
|
outputFormat := flag.String("output-format", "png", "output format (png, jpeg, gif)")
|
||||||
inputFormat := flag.String("intput-format", "row-day-seconds-count", "format of input file (json-basic) refer to `/parsers` for examples")
|
inputFormat := flag.String("input-format", "json-basic", "format of input file refer to `/parsers` for examples")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
data, err := ioutil.ReadFile(*filenameInput)
|
data, err := ioutil.ReadFile(*filenameInput)
|
||||||
|
8
testdata/basic.json
vendored
Normal file
8
testdata/basic.json
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"2020-01-01": 1,
|
||||||
|
"2020-01-02": 2,
|
||||||
|
"2020-01-03": 3,
|
||||||
|
"2020-01-04": 4,
|
||||||
|
"2020-01-05": 5,
|
||||||
|
"2020-01-06": 6
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user