arthur.bebou

Le site arthur.bebou.netlib.re - retour accueil

git clone git://bebou.netlib.re/arthur.bebou
Log | Files | Refs |

commit ec2d89678fe96c3c413e4bc372a194643a310f40
parent cb3f09179f1e1663bb59d07ebc053f8da198545b
Auterice: Arthur Pons <arthur.pons@unistra.fr>
Date:   Fri, 24 May 2024 12:37:58 +0200

Supression printlayout en tant que fichier

Diffstat:
Mcontents/index.sh | 2+-
Mpage | 11+++++++++++
Dprintlayout | 12------------
3 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/contents/index.sh b/contents/index.sh @@ -23,7 +23,7 @@ endsection cat public/articles.tsv | grep -v 'contents/index.sh' | sort -t' ' -k5 -r | - ./printlayout layouts/listearticles sh html titre desc publication | + printlayout layouts/listearticles sh html titre desc publication | fmt -s | save_md main diff --git a/page b/page @@ -43,6 +43,17 @@ the() { cat "$@" } +printlayout() { + layoutfile="$1";shift + cat | while read line + do + echo $@ | tr ' ' '\n' > "$the/vars" + echo "$line" | tr ' ' '\n' > "$the/stdin" + eval $(paste -d'\n' "$the/vars" "$the/stdin" | xargs -d'\n' printf '%s="%s";') + . $layoutfile + done +} + grep -E "^##+" "$file" > $the/titles < $the/titles lowdown | grep -v '^$' | diff --git a/printlayout b/printlayout @@ -1,12 +0,0 @@ -#! /bin/sh - -the=$(mktemp -d);trap "rm -rf $the" EXIT - -layoutfile="$1";shift -cat | while read line -do - echo $@ | tr ' ' '\n' > "$the/vars" - echo "$line" | tr ' ' '\n' > "$the/stdin" - eval $(paste -d'\n' "$the/vars" "$the/stdin" | xargs -d'\n' printf '%s="%s";') - . $layoutfile -done