You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
790 B
36 lines
790 B
input_path ?= $$HOME/notes/diary/running.csv
|
|
chart_json ?= chart.json
|
|
|
|
cmd := plot-sport --track "Tempelhof" -i "$(input_path)"
|
|
|
|
.PHONY: plot
|
|
plot:
|
|
$(cmd) "$@"
|
|
|
|
.PHONY: show
|
|
show:
|
|
$(cmd) "$@"
|
|
|
|
.PHONY: format-data
|
|
format-data: tempelhof.csv ## Format data
|
|
|
|
tempelhof.csv:
|
|
$(cmd) csv -o "$@"
|
|
|
|
.PHONY: create-chart
|
|
create-chart: ## Create new chart
|
|
./create-chart "$(chart_json)"
|
|
|
|
.PHONY: update-chart
|
|
update-chart: ## Update properties of an existing chart
|
|
ifeq ($(chart_id),)
|
|
@echo "You must set the chart_id variable"
|
|
@echo "Example: make update chart_id=ABCdef"
|
|
@exit 1
|
|
else
|
|
./update-chart "$(chart_id)" "$(chart_json)"
|
|
endif
|
|
|
|
.PHONY: help
|
|
help:
|
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-16s\033[0m %s\n", $$1, $$2}'
|
|
|