summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2024-02-16 12:18:27 +0100
committerJonas Smedegaard <dr@jones.dk>2024-02-16 12:18:27 +0100
commit80cd1bcba577fde6316050cfdbe6c672ed191cac (patch)
tree2c227bcc0232be4646aac3588ba1cbe4f7a009cb
parent6041dc9d21bce6c4c8244e5083a29d4f6fa11bb4 (diff)
add make targets screening-of-* wordcout-of-* for each article
-rw-r--r--Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 9fe219a..af1651b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+ARTICLES = learn code use
+
all: preview
preview:
@@ -12,3 +14,12 @@ publish:
tidy:
bibclean -max-width 0 ref.bib > ref.bib~
mv ref.bib~ ref.bib
+
+$(ARTICLES:%=screening-of-%): screening-of-%:
+ QUARTO_LOG_LEVEL=quiet \
+ quarto render $*/index.qmd --to man --output - | man -l -
+
+$(ARTICLES:%=wordcount-of-%): wordcount-of-%:
+ QUARTO_LOG_LEVEL=quiet \
+ quarto render $*/index.qmd --to plain --columns=9999 --output - \
+ | perl -nE 'next if /^-*$$/; $$bilag += $$_ eq "Bilag 1\n"; $$chars += length unless $$bilag; END { say $$chars }'