Add boxes filter, as suggested by bob. - tgtimes - The Gopher Times HTML git clone git://bitreich.org/tgtimes git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/tgtimes DIR Log DIR Files DIR Refs DIR Tags DIR README --- DIR commit 1adbfcd6847504a84c7e0c7a0312ea56fd24a744 DIR parent 1002873261d2894759c9e5854cfdf7568ad8e29e HTML Author: Christoph Lohmann <20h@r-36.net> Date: Thu, 10 Aug 2023 00:27:43 +0200 Add boxes filter, as suggested by bob. Diffstat: M Makefile | 16 +++++----------- M filters/markdown.filter | 5 ++++- M filters/title-boxes.filter | 4 ++++ M opus | 4 +++- 4 files changed, 16 insertions(+), 13 deletions(-) --- DIR diff --git a/Makefile b/Makefile @@ -14,22 +14,16 @@ mdptxtfiles=${mdfiles:.md=.ptxt} cat $< \ | ./filters/markdown.filter \ | fold -s \ - | { \ - boxes -d boxquote -p a1; \ - printf "\n"; \ - } \ - | ./filters/title-boxes.filter > $<.ptxt + | ./filters/boxquote.filter \ + > $<.ptxt txtfiles=$(filter-out ${tgtimes}.txt, $(wildcard opus${v}/*.txt)) txtptxtfiles=${txtfiles:.txt=.ptxt} .txt.ptxt: cat $< \ | fold -s \ - | { \ - boxes -d boxquote -p a1; \ - printf "\n"; \ - } \ - | ./filters/title-boxes.filter > $<.ptxt + | ./filters/boxquote.filter \ + > $<.ptxt rawfiles=$(wildcard opus${v}/*.raw) rawptxtfiles=${rawfiles:.raw=.ptxt} @@ -42,7 +36,7 @@ ${tgtimes}.txt: ${mdptxtfiles} ${txtptxtfiles} ${rawptxtfiles} ${tgtimes}.pdf: ${tgtimes}.txt - u2ps --header="The Gopher Times Opus ${v} :: published ${publishdate}" \ + u2ps --header="The Gopher Times Opus ${v} :: published ${publishyear}-${publishmonth}-${publishday}" \ -f Liberation \ --wrap \ --footer="page #" ${tgtimes}.txt ${tgtimes}.ps DIR diff --git a/filters/markdown.filter b/filters/markdown.filter @@ -1,4 +1,7 @@ #!/bin/sh +# +# A simple markdown filter for u2ps formatting. +# export TERM=linux @@ -34,7 +37,7 @@ do "## "*) nline="$(printf "%s\n" "${line}" \ | sed 's,^## ,,')" - printf "${boldformat}${underlineformat}%s${reset}\n" \ + printf "${boldformat}${underlineformat}%s${reset} \n" \ "${nline}" ;; " "*) DIR diff --git a/filters/title-boxes.filter b/filters/title-boxes.filter @@ -1,4 +1,8 @@ #!/usr/bin/env bash +# +# Use this when boxes is used. +# We now use the simpler filter. +# export TERM=linux DIR diff --git a/opus b/opus @@ -1,3 +1,5 @@ v=7 -publishdate=2023-08-08 +publishyear=2023 +publishmonth=08 +publisday=08