adamsgaard.dk

my academic webpage
git clone git://src.adamsgaard.dk/adamsgaard.dk
Log | Files | Refs | README | LICENSE Back to index

commit 4f9de52a9844e4cb6240b7a0c4972b5cbd42ec10
parent 2c7bd8dc7689b044cfe739e6e656acf1c1a9db04
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Wed,  3 Jun 2020 09:45:41 +0200

Capitalize title in gopher posts

Diffstat:
MMakefile | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile @@ -6,10 +6,10 @@ generate: mkdir -p $(output) saait `ls -1r pages/*.cfg` for f in pages/[0-9][0-9][0-9]*.txt; do \ - title="$$(sed -n 's/^title.*=//p' "$${f%%.txt}.cfg")"; \ + title="$$(sed -n 's/^title.*=//p' "$${f%%.txt}.cfg" | tr a-z A-Z)"; \ out="$$(printf '%s' "$$f" | sed 's/[0-9][0-9][0-9]-//')"; \ out="$(output)$${out##pages}"; \ - printf '--- %s ---\n\n' "$$title" > "$$out"; \ + printf '# %s \n\n' "$$title" > "$$out"; \ cat "$$f" >> "$$out"; \ done sed -i 's,|\([A-Za-z-]*\)\.html|server|port,|/\1.txt|server|port,' $(output)/index.gph