diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..515b9cd --- /dev/null +++ b/Makefile @@ -0,0 +1,29 @@ +.PHONY: all clean check + +# Can be replaced with 'wget' +HTTPGET = curl -O + +all: http.7 html.7 + +http-status-codes-1.csv: + $(HTTPGET) https://www.iana.org/assignments/http-status-codes/$@ + +field-names.csv: + $(HTTPGET) https://www.iana.org/assignments/http-fields/$@ + +entities.json: + $(HTTPGET) https://html.spec.whatwg.org/$@ + +http.7: http.py http-status-codes-1.csv field-names.csv + ./$< > $@ + +html.7: html.py entities.json + ./$< > $@ + +check: + -flake8 *.py + -mypy *.py + +# Downloaded files aren't removed to save on bandwidth +clean: + -rm *.7 |