From a36907e4a46b6dedda2e3df708ae79a6b9f348e7 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 31 Mar 2024 10:40:45 +0200 Subject: add make target tidy-perl; isolate make target tidy-bibtex --- .perltidyrc | 21 +++++++++++++++++++++ Makefile | 9 ++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .perltidyrc diff --git a/.perltidyrc b/.perltidyrc new file mode 100644 index 0000000..2e08554 --- /dev/null +++ b/.perltidyrc @@ -0,0 +1,21 @@ +# use best practices, except use of stdout +--perl-best-practices +--no-standard-output +--no-standard-error-output + +# use TAB for lead indentation +--tabs +--entab-leading-whitespace=4 +-nola + +# indent only already indented comments +--indent-spaced-block-comments + +# put brace on new line for named subroutines +--opening-sub-brace-on-new-line + +# preserve horisontally styled lists +--break-at-old-comma-breakpoints + +# overwrite (we use CVS), and leave backup only on error +--backup-file-extension=/~ diff --git a/Makefile b/Makefile index 4caad12..b86d491 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,8 @@ BASE_IRI = https://thoughtroam.abcdefghijklmnopqrstuvxyzæøå.dk/ ARTICLES = learn code use +PERL_FILES = bin/hedgedoc2quarto bin/xmp2rdfxml + export HEDGEDOC_COOKIES_FILE = $(CURDIR)/cookies.txt export HEDGEDOC_SERVER = https://pad.degrowth.net/ @@ -66,10 +68,15 @@ $(ARTICLES:%=pad-import-%): pad-import-%: pad-import-ref: hedgedoc import ref.bib -tidy: +tidy: tidy-bibtex tidy-perl + +tidy-bibtex: bibclean -max-width 0 ref.bib > ref.bib~ mv ref.bib~ ref.bib +tidy-perl: + perltidy -b -bext='/' --profile=.perltidyrc $(PERL_FILES) + $(ARTICLES:%=screening-of-%): screening-of-%: QUARTO_LOG_LEVEL=quiet \ quarto render $*/index.qmd --to man --output - | man -l - -- cgit v1.2.3