meso-web

Sources of the |Méso|Star> website
git clone git://git.meso-star.fr/meso-web.git
Log | Files | Refs | README | LICENSE

commit 81e16b67b4c54031afdb600afe7513d69fe95c41
parent 6551d722d2ed251b4d5923cf2b84372f9d2adb30
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Mon, 23 Jun 2025 14:23:22 +0200

Schiff: complete markdown translation

Even automatically generated download pages are first formatted in
Markdow before being converted to html.

Diffstat:
Mschiff/.gitignore | 1+
Mschiff/Makefile | 9+++++++--
Mschiff/schiff_build.sh | 18++++++++++--------
3 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/schiff/.gitignore b/schiff/.gitignore @@ -1,4 +1,5 @@ schiff.html schiff-docs.html schiff-downloads.html +schiff-downloads.md Schiff-*-GNU-Linux64/ diff --git a/schiff/Makefile b/schiff/Makefile @@ -48,6 +48,7 @@ clean: @echo "Cleaning generated files" @rm -rf man @rm -f .sig .lint .man $(HTML) $(HTML:=.err) + @rm -f schiff-downloads.md distclean: clean @echo "Cleaning PGP signatures and extracted files" @@ -83,9 +84,13 @@ schiff-docs.html: schiff-docs.md schiff_build.sh ################################################################################ # Downloads ################################################################################ -schiff-downloads.html: $(SCHIFF_SIG) $(SCHIFF_README) schiff_build.sh +schiff-downloads.html: schiff-downloads.md schiff_build.sh @echo "Building $@" - @$(SHELL) schiff_build.sh downloads $(SCHIFF_README) > $@ + @$(SHELL) schiff_build.sh downloads > $@ + +schiff-downloads.md: $(SCHIFF_SIG) $(SCHIFF_README) schiff_build.sh + @echo "Building $@" + @$(SHELL) schiff_build.sh downloads2 $(SCHIFF_README) > $@ $(SCHIFF_README) $(MAN): @echo "Extracting data from $(SCHIFF_ARCH)" diff --git a/schiff/schiff_build.sh b/schiff/schiff_build.sh @@ -38,20 +38,22 @@ documentations() downloads() { + print_header -s Schiff -n Downloads -r ../ + md2html schiff-downloads.md + print_footer +} + +downloads2() +{ if [ $# -lt 1 ]; then printf "Usage: %s downloads <readme>\n" "$0" >&2 exit 1 fi - release_notes=$(${markdown} "$1" \ - | sed -n '/^<h2>Release notes<\/h2>/,/^<h2>License<\/h2>/p' | sed '$d') - - print_header -s Schiff -n Downloads -r ../ - echo "<header><h1>Download Schiff</h1></header>" - + printf '# Downloads\n' print_downloads Schiff "Linux" - echo "${release_notes}" - print_footer + printf '\n' + sed -n '/^## Release notes/,/^## License/p' "$1" | sed '$d' } "$@"