commit 99e263d2af9e702d7809563db98ff011b9e752b7 parent c28b48f02717c7a246f1e50d0cd4ddb6f96c3af2 Author: Vincent Forest <vincent.forest@meso-star.com> Date: Mon, 25 Aug 2025 16:42:51 +0200 htrdr: use the new compilation procedure The convert_mdoc.sh script has been updated to match the new compilation process and has now been moved to the scripts subdirectory. Add the section to the menu.tsv file. Add the index.tsv file corresponding to the section. Write hooks to extract the contents of the archives, sign the downloadable content, and generate the HTML code for the manual pages with the updated convert_mdoc.sh script. Write shell scripts for dynamic content. Diffstat:
| D | convert_mdoc.sh | | | 58 | ---------------------------------------------------------- |
| D | htrdr/Makefile | | | 273 | ------------------------------------------------------------------------------- |
| A | htrdr/config.sh.in | | | 45 | +++++++++++++++++++++++++++++++++++++++++++++ |
| A | htrdr/hooks/00-extract-archive.sh | | | 38 | ++++++++++++++++++++++++++++++++++++++ |
| A | htrdr/hooks/01-generate-man.sh | | | 65 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | htrdr/hooks/xx-sign-archives.sh | | | 39 | +++++++++++++++++++++++++++++++++++++++ |
| A | htrdr/htrdr-atmosphere-spk.sh | | | 52 | ++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | htrdr/htrdr-combustion-spk.sh | | | 59 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | htrdr/htrdr-planets-spk.sh | | | 48 | ++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | htrdr/htrdr.sh | | | 31 | +++++++++++++++++++++++++++++++ |
| D | htrdr/htrdr_build.sh | | | 215 | ------------------------------------------------------------------------------- |
| A | htrdr/index.tsv | | | 6 | ++++++ |
| M | menu.tsv | | | 2 | +- |
| A | scripts/convert_mdoc.sh | | | 34 | ++++++++++++++++++++++++++++++++++ |
14 files changed, 418 insertions(+), 547 deletions(-)
diff --git a/convert_mdoc.sh b/convert_mdoc.sh @@ -1,58 +0,0 @@ -#!/bin/sh - -# Copyright (C) 2017-2025 |Méso|Star> (contact@meso-star.com) -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -set -e - -. meso-menu.sh - -section="$1" -input="$2" -output="$3" - -if [ $# -lt 3 ]; then - printf "usage: %s <section> <input> <output>\n" "${0##*/}" >&2 - exit 1 -fi - -man_name=${input##*/} -man_name=${man_name%.*} - -root="../../../" - -{ - print_header -s "${section}" -n "${man_name}" -r "${root}" - mandoc -O man=../man%S/%N.%S.html,fragment -I os=UNIX -T html "${input}" \ - | sed \ - -e 's/"Nm">htrdr-atmosphere/"Nm">htrdr\‑atmosphere/g' \ - -e 's/"Nm">htrdr-combustion/"Nm">htrdr\‑combustion/g' \ - -e 's/"Nm">htrdr-image/"Nm">htrdr\‑image/g' \ - -e 's/"Nm">htrdr-materials/"Nm">htrdr\‑materials/g' \ - -e 's/"Nm">htrdr-planets/"Nm">htrdr\‑planets/g' \ - -e "s#href=\"../man1/htpp.1.html\"#href=\"${root}htrdr/man/man1/htpp.1.html\"#g" \ - -e "s#href=\"../man5/htrdr-image.5.html\"#href=\"${root}htrdr/man/man5/htrdr-image.5.html\"#g" \ - -e 's/<a class="Xr"[^>]\{0,\}>csplit(1)<\/a>/<a class "Xr">csplit(1)<\/a>/g' \ - -e 's/<a class="Xr"[^>]\{0,\}>gnuplot(1)<\/a>/<a class "Xr">gnuplot(1)<\/a>/g' \ - -e 's/<a class="Xr"[^>]\{0,\}>mmap(2)<\/a>/<a class "Xr">mmap(2)<\/a>/g' \ - -e 's/<a class="Xr"[^>]\{0,\}>mpirun(1)<\/a>/<a class "Xr">mpirun(1)<\/a>/g' \ - -e 's/<a class="Xr"[^>]\{0,\}>ppm(5)<\/a>/<a class "Xr">ppm(5)<\/a>/g' \ - -e 's/<a class="Xr"[^>]\{0,\}>sysconf(3)<\/a>/<a class "Xr">sysconf(3)<\/a>/g' \ - -e 's/<a class="Xr"[^>]\{0,\}>wordexp(3)<\/a>/<a class "Xr">wordexp(3)<\/a>/g' - - print_footer -} > "${output}" - -sh lint_html.sh "${output}" diff --git a/htrdr/Makefile b/htrdr/Makefile @@ -1,273 +0,0 @@ -# Copyright (C) 2017-2025 |Méso|Star> (contact@meso-star.com) -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -.POSIX: - -include ../config.mk - -HTRDR_VERSION=0.11 -HTRDR_DIR=htrdr_$(HTRDR_VERSION)_doc -HTRDR_ARCH=downloads/$(HTRDR_DIR).tar.gz -HTRDR_README=$(HTRDR_DIR)/share/doc/htrdr/README.md - -ATMSPK_VERSION=0.8.0 -ATMSPK_DIR=htrdr-Atmosphere-Starter-Pack-$(ATMSPK_VERSION) -ATMSPK_ARCH=downloads/$(ATMSPK_DIR).tar.gz -ATMSPK_README=$(ATMSPK_DIR)/README.md -ATMSPK_PKG=\ - downloads/htrdr-Atmosphere-Starter-Pack-0.8.0.tar.gz\ - downloads/htrdr-Atmosphere-Starter-Pack-0.7.0.tar.gz\ - downloads/htrdr-Atmosphere-Starter-Pack-0.6.1.tar.gz\ - downloads/High-Tune-Starter-Pack-0.6.0.tar.gz\ - downloads/High-Tune-Starter-Pack-0.5.0.tar.gz\ - downloads/High-Tune-Starter-Pack-0.4.0.tar.gz\ - downloads/High-Tune-Starter-Pack-0.3.0.tar.gz\ - downloads/High-Tune-Starter-Pack-0.2.0.tar.gz\ - downloads/High-Tune-Starter-Pack-0.1.1.tar.gz -ATMSPK_SIG=$(ATMSPK_PKG:=.sig) - -COMSPK_VERSION=0.1.0 -COMSPK_DIR=htrdr-Combustion-Starter-Pack-$(COMSPK_VERSION) -COMSPK_ARCH=downloads/$(COMSPK_DIR).tar.gz -COMSPK_README=$(COMSPK_DIR)/README.md.in -COMSPK_PKG=\ - downloads/htrdr-Combustion-Starter-Pack-0.1.0.tar.gz\ - downloads/htrdr-Combustion-Starter-Pack-0.0.0.tar.gz -COMSPK_SIG=$(COMSPK_PKG:=.sig) - -PLANETSSPK_VERSION=0.1.0 -PLANETSSPK_DIR=htrdr-Planets-Starter-Pack-$(PLANETSSPK_VERSION) -PLANETSSPK_ARCH=downloads/$(PLANETSSPK_DIR).tar.gz -PLANETSSPK_README=$(PLANETSSPK_DIR)/README.md.in -PLANETSSPK_PKG=\ - downloads/htrdr-Planets-Starter-Pack-0.1.0.tar.gz -PLANETSSPK_SIG=$(PLANETSSPK_PKG:=.sig) - -MAN=\ - $(HTRDR_DIR)/share/man/man1/htpp.1\ - $(HTRDR_DIR)/share/man/man1/htrdr.1\ - $(HTRDR_DIR)/share/man/man1/htrdr-atmosphere.1\ - $(HTRDR_DIR)/share/man/man1/htrdr-combustion.1\ - $(HTRDR_DIR)/share/man/man1/htrdr-planets.1\ - $(HTRDR_DIR)/share/man/man1/les2htcp.1\ - $(HTRDR_DIR)/share/man/man5/atrri.5\ - $(HTRDR_DIR)/share/man/man5/atrtp.5\ - $(HTRDR_DIR)/share/man/man5/htcp.5\ - $(HTRDR_DIR)/share/man/man5/htmie.5\ - $(HTRDR_DIR)/share/man/man5/htrdr-image.5\ - $(HTRDR_DIR)/share/man/man5/htrdr-materials.5\ - $(HTRDR_DIR)/share/man/man5/htrdr-obj.5\ - $(HTRDR_DIR)/share/man/man5/mrumtl.5\ - $(HTRDR_DIR)/share/man/man5/rngt.5\ - $(HTRDR_DIR)/share/man/man5/rnpfi.5\ - $(HTRDR_DIR)/share/man/man5/rnrl.5\ - $(HTRDR_DIR)/share/man/man5/rnsf.5\ - $(HTRDR_DIR)/share/man/man5/rnsl.5\ - $(HTRDR_DIR)/share/man/man5/rnsp.5\ - $(HTRDR_DIR)/share/man/man5/sars.5\ - $(HTRDR_DIR)/share/man/man5/sbuf.5\ - $(HTRDR_DIR)/share/man/man5/sck.5\ - $(HTRDR_DIR)/share/man/man5/smsh.5 - -OVERVIEW_IMG=\ - images/CLEMENT.jpg\ - images/CLEMENT_lw_9000_10000.jpg\ - thumbs/CLEMENT.jpg\ - thumbs/CLEMENT_lw_9000_10000.jpg\ - images/downward_flux_500x500x2048_sw_380_4000_879.349.jpg\ - images/downward_flux_500x500x2048_lw_4000_100000_425.156.jpg\ - thumbs/downward_flux_500x500x2048_sw_380_4000_879.349.jpg\ - thumbs/downward_flux_500x500x2048_lw_4000_100000_425.156.jpg\ - downloads/teapot_city_clouds.mp4\ - images/gulder_horizontal_slides.jpg\ - thumbs/gulder_horizontal_slides.jpg\ - gulder_sideview.jpg\ - R8tr3.1.ARMCu.OUT.218.jpg\ - images/titan_1280x960x4096.jpg\ - images/titan_transit.jpg\ - thumbs/titan_1280x960x4096.jpg\ - thumbs/titan_transit.jpg - -ATMSPK_IMG=\ - images/DZVAR.jpg\ - images/DZVAR2.jpg\ - images/L12km_BOMEX.jpg\ - images/L25_Fire.jpg\ - images/city_thin_lens.jpg\ - thumbs/DZVAR.jpg\ - thumbs/DZVAR2.jpg\ - thumbs/L12km_BOMEX.jpg\ - thumbs/L25_Fire.jpg\ - thumbs/city_thin_lens.jpg \ - DZVAR_ortho.jpg\ - city.jpg - -COMSPK_IMG=\ - images/dummy_medium.jpg\ - images/dummy_medium_clipped.jpg\ - images/gulder_lateral.jpg\ - thumbs/dummy_medium.jpg\ - thumbs/dummy_medium_clipped.jpg\ - thumbs/gulder_lateral.jpg - -PLANETSSPK_IMG=\ - images/random01_visible.jpg\ - images/random01_LW_10-12um.jpg\ - thumbs/random01_visible.jpg\ - thumbs/random01_LW_10-12um.jpg - -IMG=$(OVERVIEW_IMG) $(ATMSPK_IMG) $(COMSPK_IMG) $(PLANETSSPK_IMG) $(MODS_IMG) -HTML=\ - htrdr.html\ - htrdr-atmosphere-spk.html\ - htrdr-combustion-spk.html\ - htrdr-planets-spk.html\ - htrdr-docs.html - -build: .sig .man - @$(MAKE) -fMakefile -f .sig -f .man build_all - -build_all: $(HTML) man - -clean: - @echo "Cleaning generated files" - @rm -rf man - @rm -f .sig .lint .man $(HTML) $(HTML:=.err) - @rm -f htrdr.md - @rm -f htrdr-atmosphere-spk.md - @rm -f htrdr-combustion-spk.md - @rm -f htrdr-planets-spk.md - -distclean: clean - @echo "Cleaning PGP signatures and extracted files" - @rm -f\ - $(ATMSPK_SIG)\ - $(ATMSPK_README)\ - $(COMSPK_SIG)\ - $(COMSPK_README)\ - $(PLANETSSPK_SIG)\ - $(PLANETSSPK_README)\ - $(HTRDR_README)\ - $(MAN) - -install: build - @rsync -avzrR --delete-after --progress\ - downloads/gas_opt_prop_en.pdf\ - $(HTML)\ - $(IMG)\ - $$(find man -name "*.html")\ - $(ATMSPK_PKG)\ - $(ATMSPK_SIG)\ - $(COMSPK_PKG)\ - $(COMSPK_SIG)\ - $(PLANETSSPK_PKG)\ - $(PLANETSSPK_SIG)\ - $(PREFIX)/htrdr/ - -htrdr_build.sh: ../meso-menu.sh - @touch $@ - -################################################################################ -# Overview -################################################################################ -htrdr.html: htrdr.md htrdr_build.sh - @echo "Building $@" - @$(SHELL) htrdr_build.sh overview2 > $@ - -htrdr.md: htrdr.md.in $(HTRDR_README) $(OVERVIEW_IMG) htrdr_build.sh Makefile - @echo "Building $@" - @$(SHELL) htrdr_build.sh overview $(HTRDR_README) $(HTRDR_VERSION) > $@ - -$(HTRDR_README) $(MAN): - @echo "Extracting data from $(HTRDR_ARCH)" - @tar -xz -f $(HTRDR_ARCH) $(HTRDR_README) $(MAN) - -################################################################################ -# Reference documentations -################################################################################ -htrdr-docs.html: htrdr-docs.md htrdr_build.sh - @echo "Building $@" - @$(SHELL) htrdr_build.sh documentations > $@ - -################################################################################ -# Atmosphere Starter-Pack -################################################################################ -htrdr-atmosphere-spk.html: htrdr-atmosphere-spk.md htrdr_build.sh - @echo "Building $@" - @$(SHELL) htrdr_build.sh atmspk2 > $@ - -htrdr-atmosphere-spk.md: $(ATMSPK_IMG) $(ATMSPK_SIG) $(ATMSPK_README) htrdr_build.sh - @echo "Building $@" - @$(SHELL) htrdr_build.sh atmspk $(ATMSPK_README) > $@ - -$(ATMSPK_README): - @echo "Extracting data from $(ATMSPK_ARCH)" - @tar -xz -f $(ATMSPK_ARCH) $(ATMSPK_README) - -################################################################################ -# Combustion Starter-Pack -################################################################################ -htrdr-combustion-spk.html: htrdr-combustion-spk.md htrdr_build.sh - @echo "Building $@" - @$(SHELL) htrdr_build.sh comspk2 > $@ - -htrdr-combustion-spk.md: $(COMSPK_IMG) $(COMSPK_SIG) $(COMSPK_README) htrdr_build.sh - @echo "Building $@" - @$(SHELL) htrdr_build.sh comspk $(COMSPK_README) $(COMSPK_VERSION)> $@ - -$(COMSPK_README): - @echo "Extracting data from $(COMSPK_ARCH)" - @tar -xz -f $(COMSPK_ARCH) $(COMSPK_README) - -################################################################################ -# Planets Starter-Pack -################################################################################ -htrdr-planets-spk.html: htrdr-planets-spk.md htrdr_build.sh - @echo "Building $@" - @$(SHELL) htrdr_build.sh planetsspk2 > $@ - -htrdr-planets-spk.md: $(PLANETSSPK_IMG) $(PLANETSSPK_SIG) $(PLANETSSPK_README) htrdr_build.sh - @echo "Building $@" - @$(SHELL) htrdr_build.sh planetsspk $(PLANETSSPK_README) $(PLANETSSPK_VERSION) > $@ - -$(PLANETSSPK_README): - @echo "Extracting data from $(PLANETSSPK_ARCH)" - @tar -xz -f $(PLANETSSPK_ARCH) $(PLANETSSPK_README) - -################################################################################ -# Check files -################################################################################ -lint: build .lint - @$(MAKE) -fMakefile -f .lint lint_all - -lint_all: lint_shells $(HTML:=.lint) - -lint_shells: - @echo "Linting htrdr_build.sh" && shellcheck -o all -x htrdr_build.sh - -################################################################################ -# Miscellaneous -################################################################################ -.sig: Makefile ../configure_targets.sh - @echo "Setup .sig" - @$(SHELL) ../configure_targets.sh sig \ - $(ATMSPK_PKG) $(COMSPK_PKG) $(PLANETSSPK_PKG) > .sig - -.lint: Makefile ../configure_targets.sh - @echo "Setup .lint" - @$(SHELL) ../configure_targets.sh lint $(HTML) > .lint - -.man: Makefile ../configure_targets.sh - @echo "Setup .man" - @$(SHELL) ../configure_targets.sh mdoc htrdr $(MAN) > $@ diff --git a/htrdr/config.sh.in b/htrdr/config.sh.in @@ -0,0 +1,45 @@ +#!/bin/sh + +# htrdr +htrdr_version="0.11" +htrdr_dir="htrdr_${htrdr_version}_doc" +htrdr_arch="downloads/${htrdr_dir}.tar.gz" +htrdr_readme="${htrdr_dir}/share/doc/htrdr/README.md" + +# Atmosphere starter-pack +atmspk_version="0.8.0" +atmspk_dir="htrdr-Atmosphere-Starter-Pack-${atmspk_version}" +atmspk_arch="downloads/${atmspk_dir}.tar.gz" +atmspk_readme="${atmspk_dir}/README.md" + +# Combustion starter-pack +comspk_version="0.1.0" +comspk_dir="htrdr-Combustion-Starter-Pack-${comspk_version}" +comspk_arch="downloads/${comspk_dir}.tar.gz" +comspk_readme="${comspk_dir}/README.md.in" + +# Planets starter-pack +pntspk_version="0.1.0" +pntspk_dir="htrdr-Planets-Starter-Pack-${pntspk_version}" +pntspk_arch="downloads/${pntspk_dir}.tar.gz" +pntspk_readme="${pntspk_dir}/README.md.in" + +################################################################################ +# Helper function +################################################################################ +list_starter_packs() +( + printf '<table class="list">\n' + printf ' <tr><th>Version</th><th>Archive</th></tr>\n' + while read -r _i ; do + _version="$(echo "${_i}" | sed "s/.*Starter-Pack-\(.*\)\.tar.gz/\1/g")" + printf ' <tr>\n' + printf ' <td>%s</td>\n' "${_version}" + printf ' <td>\n' + printf ' [<a href="%s">tarball</a>]\n' "${_i}" + printf ' [<a href="%s.sig">pgp</a>]\n' "${_i}" + printf ' </td>\n' + printf ' </tr>\n' + done + printf '</table>\n\n' +) diff --git a/htrdr/hooks/00-extract-archive.sh b/htrdr/hooks/00-extract-archive.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +# Copyright (C) 2017-2025 |Méso|Star> (contact@meso-star.com) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +set -e + +. "./config.sh.in" + +>&2 printf 'Extracting %s\n' "${htrdr_arch}" +tar -xz -f "${htrdr_arch}" "${htrdr_dir}/share/man" "${htrdr_readme}" + +if ! [ -f "${atmspk_readme}" ]; then + >&2 printf 'Extracting %s\n' "${atmspk_arch}" + tar -xz -f "${atmspk_arch}" "${atmspk_readme}" +fi + +if ! [ -f "${comspk_readme}" ]; then + >&2 printf 'Extracting %s\n' "${comspk_arch}" + tar -xz -f "${comspk_arch}" "${comspk_readme}" +fi + +if ! [ -f "${pntspk_readme}" ]; then + >&2 printf 'Extracting %s\n' "${pntspk_arch}" + tar -xz -f "${pntspk_arch}" "${pntspk_readme}" +fi diff --git a/htrdr/hooks/01-generate-man.sh b/htrdr/hooks/01-generate-man.sh @@ -0,0 +1,65 @@ +#!/bin/sh + +# Copyright (C) 2017-2025 |Méso|Star> (contact@meso-star.com) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +set -e + +. "./config.sh.in" + +######################################################################## +# Helper function +######################################################################## +man_pages() +{ + find "${htrdr_dir}/share/man" -type f -name "*.[1-9]" +} + +# Man to convert is submitted on stdin +man2html() # output_filename +{ + { + cd .. + sh ./scripts/generate_header.sh "${OLDPWD##*/}/$1" + sh ./scripts/convert_mdoc.sh + cat ./footer.html + cd "${OLDPWD}" + } > "$1" +} + +######################################################################## +# The script +######################################################################## +man_pages | while read -r i; do + filename="$(basename "${i}")" + section="${filename##*.}" + + if ! [ -d "./man/man${section}" ]; then + mkdir -p "./man/man${section}"; + fi + + dst="man/man${section}/${filename}.html" + man2html "${dst}" < "${i}" + + # Check the result of the HTML conversion + if ! tidy --show-info no --show-filename yes -qe "${dst}"; then + >&2 printf '%s: error converting %s\n' "${0##*/}" "${i}" + exit 1 + fi + + # Write the generated files to standard output to inform the build + # system which files it needs to handle during installation. + printf '%s/%s\n' "${PWD##*/}" "${dst}" +done diff --git a/htrdr/hooks/xx-sign-archives.sh b/htrdr/hooks/xx-sign-archives.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +# Copyright (C) 2017-2025 |Méso|Star> (contact@meso-star.com) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +set -e + +find downloads \ + -name "*.tar" \ + -o -name "*.tar.gz" \ + -o -name "*.tgz" \ + -o -name "*.zip" \ +| sort \ +| while read -r i; do + + sign="${i}.sig" + + if ! [ -f "${sign}" ]; then + >&2 printf 'Signing %s\n' "${i}" + gpg --yes -a -o "${sign}" --detach-sign "${i}" + fi + + # Write the generated files to standard output to inform the build + # system which files it needs to handle during installation. + printf '%s/%s\n' "${PWD##*/}" "${i}.sig" + +done diff --git a/htrdr/htrdr-atmosphere-spk.sh b/htrdr/htrdr-atmosphere-spk.sh @@ -0,0 +1,52 @@ +#!/bin/sh + +# Copyright (C) 2017-2025 |Méso|Star> (contact@meso-star.com) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +. "./config.sh.in" + +set -e + +sed -n '0,/^## Content/p' "${atmspk_readme}" | sed '$d' # Intro + +printf '[](images/city_thin_lens.jpg)\n' +printf '\n' +printf '> The image of the city scene rendered with\n' +printf "> \`htrdr-atmosphere\`.\n" +printf '> The thin lens camera used in this rendering focuses on\n' +printf '> background elements; the foreground vegetation is out of focus.\n' +printf '\n' + +printf '## Downloads\n' + +archs=$(find downloads -name "htrdr-Atmosphere-Starter-Pack*.tar.gz" \ + -o -name "High-Tune-Starter-Pack*.tar.gz" | sort -r) +printf '%s\n' "${archs}" | list_starter_packs + +sed -n '/^## Quick start/,/^## Release notes/p' "${atmspk_readme}" | sed '$d' + +sed -n '/^## Content/,/^### Water/p' "${atmspk_readme}" | sed '$d' + +printf '[](images/DZVAR.jpg)\n\n' +printf '[](images/DZVAR2.jpg)\n\n' +printf '[](images/L12km_BOMEX.jpg)\n\n' +printf '[](images/L25_Fire.jpg)\n\n' +printf '\n' +printf '> Images of the DZVAR, DZVAR2, L12km_BOMEX and L25_Fire scenes\n' +printf "> rendered with \"htrdr-atmosphere\".\n" + +sed -n '/^### Water/,/^## Quick start/p' "${atmspk_readme}" | sed '$d' + +sed -n '/^## Release notes/,$p' "${atmspk_readme}" diff --git a/htrdr/htrdr-combustion-spk.sh b/htrdr/htrdr-combustion-spk.sh @@ -0,0 +1,59 @@ +#!/bin/sh + +# Copyright (C) 2017-2025 |Méso|Star> (contact@meso-star.com) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +. "./config.sh.in" + +set -e + + sed -n '0,/^## Gulder/p' "${comspk_readme}" \ +| sed '$d' \ +| sed "s/\${VERSION}/${comspk_version}/g" \ +| sed 's#https://www.meso-star.com/projects/htrdr/##g' + +printf '## Downloads\n' + +archs=$(find downloads -name "htrdr-Combustion-Starter-Pack*.tar.gz" | sort -r) +printf '%s\n' "${archs}" | list_starter_packs + +sed -n '/^## Gulder/,/^## Dummy medium/p' "${comspk_readme}" | sed '$d' + +printf '[](images/gulder_lateral.jpg)\n' +printf '\n' +printf '> Rendering in the visible range of the Gülder flame calculated\n' +printf '> by [htrdr-combustion](man/man1/htrdr-combustion.1.html).\n' +printf '> The flame is illuminated by a vertical laser sheet that\n' +printf '> crosses the central axis of the flame, from left to right.\n' +printf '> The image displays the radiation emitted by the laser,\n' +printf '> scattered and transmitted by the combustion medium for\n' +printf '> wavelength (here 532 nm).\n' + +sed -n '/^## Dummy medium/,/^## Validation program/p' "${comspk_readme}" | sed '$d' + +printf '[](images/dummy_medium.jpg)\n' +printf '\n' +printf '> Illustration of the dummy medium provided in the Starter Pack.\n' +printf '> This medium is illuminated by a laser sheet whose surface of\n' +printf '> emission is here represented in red. \n' +printf '\n' +printf '[]' +printf '(images/dummy_medium_clipped.jpg)\n' +printf '\n' +printf '> Dummy medium clipped along the y axis to emphasize\n' +printf '> the axisymmetric profile of its soot volume fraction.\n' + + sed -n '/^## Validation program/,$p' "${comspk_readme}" \ +| sed "s/\${VERSION}/${comspk_version}/g" diff --git a/htrdr/htrdr-planets-spk.sh b/htrdr/htrdr-planets-spk.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +# Copyright (C) 2017-2025 |Méso|Star> (contact@meso-star.com) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +. "./config.sh.in" + +set -e + + sed -n '0,/^## Content/p' "${pntspk_readme}" \ +| sed '$d' \ +| sed "s/\${VERSION}/${pntspk_version}/g" + +printf '## Downloads\n' + +archs=$(find downloads -name "htrdr-Planets-Starter-Pack*.tar.gz" | sort -r) +printf '%s\n' "${archs}" | list_starter_packs + + sed -n "/^## Content/,/^### \`sun_intensity_lite.bin\`/p" "${pntspk_readme}" \ +| sed '$d' + +printf '[]' +printf '(images/random01_visible.jpg)\n' +printf '\n' +printf '> Images rendered by [htrdr-planets](man/man1/htrdr-planets.1.html)\n' +printf '> from the random01 dataset.\n' +printf '\n' +printf '[]' +printf '(images/random01_LW_10-12um.jpg)\n' +printf '\n' +printf '> Brightness temperature, in Kelvins of the random01 dataset.\n' +printf '> Cold zones (in altitude) or highly reflective (i.e. weakly emitting)\n' +printf '> zones are made visible because of their lower specific intensity.\n' +printf '\n' + +sed -n '/^### `sun_intensity_lite.bin`/,$p' "${pntspk_readme}" diff --git a/htrdr/htrdr.sh b/htrdr/htrdr.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +# Copyright (C) 2017-2025 |Méso|Star> (contact@meso-star.com) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +. "./config.sh.in" + +set -e + +{ + sed -n '0,/^## History/p' htrdr.md.in | sed '$d' + sed -n '/^## Release notes/,/^## Copyright/p' "${htrdr_readme}" | sed '$d' + sed -n '/^## History/,$p' htrdr.md.in + sed -n '/^## Copyright/,$p' "${htrdr_readme}" +} \ +| sed "s/@VERSION@/$2/g" \ +| sed 's/https:\/\/gitlab.com\/meso-star\/htrdr\/-\/blob\/master\/doc\/htrdr-materials\.5\.txt/man\/man5\/htrdr-materials.5.html/g' \ +| sed 's/https:\/\/gitlab.com\/meso-star\/htrdr\/-\/blob\/master\/doc\/htrdr-obj\.5\.txt/man\/man5\/htrdr-obj.5.html/g' \ +| sed 's/https:\/\/gitlab.com\/meso-star\/mrumtl\/-\/blob\/master\/doc\/mrumtl\.5\.txt/man\/man5\/mrumtl.5.html/g' diff --git a/htrdr/htrdr_build.sh b/htrdr/htrdr_build.sh @@ -1,215 +0,0 @@ -#!/bin/sh -e - -# Copyright (C) 2017-2025 |Méso|Star> (contact@meso-star.com) -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -. ../meso-menu.sh - -list_starter_packs() -{ - printf '<table class="list">\n' - printf ' <tr><th>Version</th><th>Archive</th></tr>\n' - while read -r i ; do - version=$(echo "${i}" | sed "s/.*Starter-Pack-\(.*\)\.tar.gz/\1/g") - printf ' <tr>\n' - printf ' <td>%s</td>\n' "${version}" - printf ' <td>\n' - printf ' [<a href="%s">tarball</a>]\n' "${i}" - printf ' [<a href="%s.sig">pgp</a>]\n' "${i}" - printf ' </td>\n' - printf ' </tr>\n' - done - printf '</table>\n\n' -} - -overview2() -{ - print_header -s htrdr -n Overview -r ../ - md2html htrdr.md - print_footer -} - -overview() -{ - if [ $# -lt 2 ]; then - printf "Usage: %s overview <readme> <version>\n" "$0" >&2 - exit 1 - fi - - { - sed -n '0,/^## History/p' htrdr.md.in | sed '$d'; - sed -n '/^## Release notes/,/^## Copyright/p' "$1" | sed '$d'; - sed -n '/^## History/,$p' htrdr.md.in; - sed -n '/^## Copyright/,$p' "$1"; - } \ - | sed "s/@VERSION@/$2/g" \ - | sed 's/https:\/\/gitlab.com\/meso-star\/htrdr\/-\/blob\/master\/doc\/htrdr-materials\.5\.txt/man\/man5\/htrdr-materials.5.html/g' \ - | sed 's/https:\/\/gitlab.com\/meso-star\/htrdr\/-\/blob\/master\/doc\/htrdr-obj\.5\.txt/man\/man5\/htrdr-obj.5.html/g' \ - | sed 's/https:\/\/gitlab.com\/meso-star\/mrumtl\/-\/blob\/master\/doc\/mrumtl\.5\.txt/man\/man5\/mrumtl.5.html/g' -} - -documentations() -{ - print_header -s htrdr -n Documentations -r ../ - md2html htrdr-docs.md - print_footer -} - -atmspk2() -{ - print_header -s htrdr -n Atmosphere-Starter-Pack -r ../ - md2html htrdr-atmosphere-spk.md - print_footer -} - -atmspk() -{ - if [ $# -lt 1 ]; then - printf "Usage: %s atmspk <readme>\n" "$0" >&2 - exit 1 - fi - - sed -n '0,/^## Content/p' "$1" | sed '$d' # Intro - - printf '[](images/city_thin_lens.jpg)\n' - printf '\n' - printf '> The image of the city scene rendered with\n' - # shellcheck disable=SC2016 - printf '> `htrdr-atmosphere`.\n' - printf '> The thin lens camera used in this rendering focuses on\n' - printf '> background elements; the foreground vegetation is out of focus.\n' - printf '\n' - - printf '## Downloads\n' - - archs=$(find downloads -name "htrdr-Atmosphere-Starter-Pack*.tar.gz" \ - -o -name "High-Tune-Starter-Pack*.tar.gz" | sort -r) - printf '%s\n' "${archs}" | list_starter_packs - - sed -n '/^## Quick start/,/^## Release notes/p' "$1" | sed '$d' - - sed -n '/^## Content/,/^### Water/p' "$1" | sed '$d' - - printf '[](images/DZVAR.jpg)\n\n' - printf '[](images/DZVAR2.jpg)\n\n' - printf '[](images/L12km_BOMEX.jpg)\n\n' - printf '[](images/L25_Fire.jpg)\n\n' - printf '\n' - printf '> Images of the DZVAR, DZVAR2, L12km_BOMEX and L25_Fire scenes\n' - # shellcheck disable=SC2016 - printf '> rendered with `htrdr-atmosphere`.\n' - - sed -n '/^### Water/,/^## Quick start/p' "$1" | sed '$d' - - sed -n '/^## Release notes/,$p' "$1" -} - -comspk2() -{ - print_header -s htrdr -n Combustion-Starter-Pack -r ../ - md2html htrdr-combustion-spk.md - print_footer -} - -comspk() -{ - if [ $# -lt 2 ]; then - printf "Usage: %s comspk <readme> <version>\n" "$0" >&2 - exit 1 - fi - - # shellcheck disable=SC2016 - sed -n '0,/^## Gulder/p' "$1" \ - | sed '$d' \ - | sed 's/${VERSION}/'"$2"'/g' \ - | sed 's#https://www.meso-star.com/projects/htrdr/##g' - - printf '## Downloads\n' - - archs=$(find downloads -name "htrdr-Combustion-Starter-Pack*.tar.gz" | sort -r) - printf '%s\n' "${archs}" | list_starter_packs - - sed -n '/^## Gulder/,/^## Dummy medium/p' "$1" | sed '$d' - - printf '[](images/gulder_lateral.jpg)\n' - printf '\n' - printf '> Rendering in the visible range of the Gülder flame calculated\n' - printf '> by [htrdr-combustion](man/man1/htrdr-combustion.1.html).\n' - printf '> The flame is illuminated by a vertical laser sheet that\n' - printf '> crosses the central axis of the flame, from left to right.\n' - printf '> The image displays the radiation emitted by the laser,\n' - printf '> scattered and transmitted by the combustion medium for\n' - printf '> wavelength (here 532 nm).\n' - - sed -n '/^## Dummy medium/,/^## Validation program/p' "$1" | sed '$d' - - printf '[](images/dummy_medium.jpg)\n' - printf '\n' - printf '> Illustration of the dummy medium provided in the Starter Pack.\n' - printf '> This medium is illuminated by a laser sheet whose surface of\n' - printf '> emission is here represented in red. \n' - printf '\n' - printf '[](images/dummy_medium_clipped.jpg)\n' - printf '\n' - printf '> Dummy medium clipped along the y axis to emphasize\n' - printf '> the axisymmetric profile of its soot volume fraction.\n' - - # shellcheck disable=SC2016 - sed -n '/^## Validation program/,$p' "$1" | sed 's/${VERSION}/'"$2"'/g' -} - -planetsspk2() -{ - print_header -s htrdr -n Planets-Starter-Pack -r ../ - md2html htrdr-planets-spk.md - print_footer -} - -planetsspk() -{ - if [ $# -lt 2 ]; then - printf "Usage: %s planetsspk <readme> <version>\n" "$0" >&2 - exit 1 - fi - - # shellcheck disable=SC2016 - sed -n '0,/^## Content/p' "$1" | sed '$d' | sed 's/${VERSION}/'"$2"'/g' - - printf '[](images/random01_visible.jpg)\n' - printf '\n' - printf '> Images rendered by [htrdr-planets](man/man1/htrdr-planets.1.html)\n' - printf '> from the random01 dataset.\n' - printf '\n' - - printf '## Downloads\n' - - archs=$(find downloads -name "htrdr-Planets-Starter-Pack*.tar.gz" | sort -r) - printf '%s\n' "${archs}" | list_starter_packs - - # shellcheck disable=SC2016 - sed -n '/^## Content/,/^### `sun_intensity_lite.bin`/p' "$1" | sed '$d' - - printf '[](images/random01_LW_10-12um.jpg)\n' - printf '\n' - printf '> Brightness temperature, in Kelvins of the random01 dataset.\n' - printf '> Cold zones (in altitude) or highly reflective (i.e. weakly emitting)\n' - printf '> zones are made visible because of their lower specific intensity.\n' - printf '\n' - - # shellcheck disable=SC2016 - sed -n '/^### `sun_intensity_lite.bin`/,$p' "$1" -} - -"$@" diff --git a/htrdr/index.tsv b/htrdr/index.tsv @@ -0,0 +1,6 @@ +Overview htrdr.html +Manual pages htrdr-docs.html +Atmosphere htrdr-atmosphere-spk.html +Combustion htrdr-combustion-spk.html +Planets htrdr-planets-spk.html +Git https://gitlab.com/meso-star/htrdr diff --git a/menu.tsv b/menu.tsv @@ -1,6 +1,6 @@ Home misc A.R.T art -#htrdr htrdr +htrdr htrdr Schiff schiff Solstice solstice #Stardis stardis diff --git a/scripts/convert_mdoc.sh b/scripts/convert_mdoc.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +# Copyright (C) 2017-2025 |Méso|Star> (contact@meso-star.com) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +set -e + + mandoc -O man=../man%S/%N.%S.html,fragment -I os=UNIX -T html \ +| sed -e 's/"Nm">htrdr-atmosphere/"Nm">htrdr\‑atmosphere/g' \ + -e 's/"Nm">htrdr-combustion/"Nm">htrdr\‑combustion/g' \ + -e 's/"Nm">htrdr-image/"Nm">htrdr\‑image/g' \ + -e 's/"Nm">htrdr-materials/"Nm">htrdr\‑materials/g' \ + -e 's/"Nm">htrdr-planets/"Nm">htrdr\‑planets/g' \ + -e "s#href=\"../man1/htpp.1.html\"#href=\"${worktree}htrdr/man/man1/htpp.1.html\"#g" \ + -e "s#href=\"../man5/htrdr-image.5.html\"#href=\"${worktree}htrdr/man/man5/htrdr-image.5.html\"#g" \ + -e 's/<a class="Xr"[^>]\{0,\}>csplit(1)<\/a>/<a class "Xr">csplit(1)<\/a>/g' \ + -e 's/<a class="Xr"[^>]\{0,\}>gnuplot(1)<\/a>/<a class "Xr">gnuplot(1)<\/a>/g' \ + -e 's/<a class="Xr"[^>]\{0,\}>mmap(2)<\/a>/<a class "Xr">mmap(2)<\/a>/g' \ + -e 's/<a class="Xr"[^>]\{0,\}>mpirun(1)<\/a>/<a class "Xr">mpirun(1)<\/a>/g' \ + -e 's/<a class="Xr"[^>]\{0,\}>ppm(5)<\/a>/<a class "Xr">ppm(5)<\/a>/g' \ + -e 's/<a class="Xr"[^>]\{0,\}>sysconf(3)<\/a>/<a class "Xr">sysconf(3)<\/a>/g' \ + -e 's/<a class="Xr"[^>]\{0,\}>wordexp(3)<\/a>/<a class "Xr">wordexp(3)<\/a>/g'