From b291b529573e80539c30a930b8e5ad215d734564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Wed, 19 May 2021 22:57:48 +0300 Subject: [PATCH] word count --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index c1a821a..dfc32a6 100644 --- a/Makefile +++ b/Makefile @@ -204,6 +204,13 @@ clean-tables: ## Remove tables created during unit or rivers tests help: ## Print this help message @awk -F':.*?## ' '/^[a-z0-9.-]*: *.*## */{printf "%-18s %s\n",$$1,$$2}' $(MAKEFILE_LIST) +.PHONY: wc +wc: mj-msc.pdf ## Character and page count + @pdftotext $< - | \ + awk '/\yReferences\y/{exit}; {print}' | \ + tr -d '[:space:]' | wc -c | \ + awk '{printf("Chars: %d, pages: %.1f\n", $$1, $$1/1500)}' + $(OSM): wget http://download.geofabrik.de/europe/$@