From 80cd1bcba577fde6316050cfdbe6c672ed191cac Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 16 Feb 2024 12:18:27 +0100 Subject: add make targets screening-of-* wordcout-of-* for each article --- Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Makefile') 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 }' -- cgit v1.2.3