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 b3824bdcd491fcad73d46540bbca1cbc224b891e
parent d994203907633b247b96adb75fbac4ff5bd0e2ef
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Mon, 30 Jun 2025 17:12:10 +0200

htrdr: translate the Planets SPK into markdown

As with the atmosphere and combustion starter packs, it's actually its
editing that's now done in Markdown; its text already being written in
Markdown in the pack's README file.

Diffstat:
Mhtrdr/.gitignore | 1+
Mhtrdr/Makefile | 23+++++++++++++----------
Mhtrdr/htrdr_build.sh | 116++++++++++++++++++++++++-------------------------------------------------------
Rhtrdr/random01_LW_10-12um.jpg -> htrdr/images/random01_LW_10-12um.jpg | 0
Rhtrdr/random01_visible.jpg -> htrdr/images/random01_visible.jpg | 0
Ahtrdr/thumbs/random01_LW_10-12um.jpg | 2++
Ahtrdr/thumbs/random01_visible.jpg | 2++
7 files changed, 53 insertions(+), 91 deletions(-)

diff --git a/htrdr/.gitignore b/htrdr/.gitignore @@ -6,6 +6,7 @@ htrdr-atmosphere-spk.md htrdr-atmosphere-spk.html htrdr-combustion-spk.md htrdr-combustion-spk.html +htrdr-planets-spk.md htrdr-planets-spk.html htrdr-*-GNU-Linux64/ htrdr_*_doc/ diff --git a/htrdr/Makefile b/htrdr/Makefile @@ -122,8 +122,10 @@ COMSPK_IMG=\ thumbs/gulder_lateral.jpg PLANETSSPK_IMG=\ - random01_visible.jpg\ - random01_LW_10-12um.jpg + 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=\ @@ -142,8 +144,10 @@ clean: @echo "Cleaning generated files" @rm -rf man @rm -f .sig .lint .man $(HTML) $(HTML:=.err) - @rm -f htrdr-atmosphere-spk.md @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" @@ -229,14 +233,13 @@ $(COMSPK_README): ################################################################################ # Planets Starter-Pack ################################################################################ -htrdr-planets-spk.html:\ - $(PLANETSSPK_IMG) \ - $(PLANETSSPK_SIG) \ - $(PLANETSSPK_README) \ - htrdr_build.sh +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_ARCH) > $@ + @$(SHELL) htrdr_build.sh planetsspk $(PLANETSSPK_README) $(PLANETSSPK_VERSION) > $@ $(PLANETSSPK_README): @echo "Extracting data from $(PLANETSSPK_ARCH)" diff --git a/htrdr/htrdr_build.sh b/htrdr/htrdr_build.sh @@ -96,22 +96,7 @@ atmspk() archs=$(find downloads -name "htrdr-Atmosphere-Starter-Pack*.tar.gz" \ -o -name "High-Tune-Starter-Pack*.tar.gz" | sort -r) - - printf '<table class="list">\n' - printf ' <tr><th>Version</th><th>Archive</th></tr>\n' - - printf '%s\n' "${archs}" | \ - 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' + printf '%s\n' "${archs}" | list_starter_packs sed -n '/^## Quick start/,/^## Release notes/p' "$1" | sed '$d' @@ -185,77 +170,46 @@ comspk() sed -n '/^## Validation program/,$p' "$1" | sed 's/${VERSION}/'"$2"'/g' } +planetsspk2() +{ + print_header -s htrdr -n Planetsn-Starter-Pack -r ../ + md2html htrdr-planets-spk.md + print_footer +} + planetsspk() { - if [ $# -lt 3 ]; then - printf "Usage: %s planetsspk <readme> <version> <private-archive>\n" "$0" >&2 + if [ $# -lt 2 ]; then + printf "Usage: %s planetsspk <readme> <version>\n" "$0" >&2 exit 1 fi - readme=$(VERSION=$2 envsubst < "$1"\ - | "${markdown}"\ - | sed 's/<pre><code>/<pre class="code">/g'\ - | sed 's/<\/code><\/pre>/<\/pre>/g') - intro=$(echo "${readme}" \ - | sed '/^<h2>Content<\/h2>/q' \ - | sed -e '1d' -e '$d' \ - | sed '0,/<code>htrdr-planets<\/code>/s//<a href=man\/man1\/htrdr-planets.1.html>htrdr-planets<\/a>/') - titan=$(echo "${readme}"\ - | sed -n '/^<h3>Titan<\/h3>/,/^<h3>Random01<\/h3>/p'\ - | sed -e '1d' -e '$d') - random01=$(echo "${readme}"\ - | sed -n '/^<h3>Random01<\/h3>/,/^<h3><code>sun_intensity_lite.bin<\/code><\/h3>/p'\ - | sed -e '1d' -e '$d') - sun_intensity_lite=$(echo "${readme}"\ - | sed -n '/^<h3><code>sun_intensity_lite.bin<\/code><\/h3>/,/<h2>Copyright notice<\/h2>/p'\ - | sed -e '1d' -e '$d') - copying=$(echo "${readme}" | sed -n '/^<h2>Copyright notice<\/h2>/,$p') - - print_header -s htrdr -n Planets-Starter-Pack -r ../ - - echo "<header>" - echo " <h1>Planets Starter Pack</h1>" - echo "</header>" - echo "<div class=\"news\">" - echo " <p><b>Planets Starter Pack $2</b></p>" - echo " <ul>" - echo " <li><a href=\"$3\">tarball</a> /" - echo " <a href=\"$3.sig\">pgp</a></li>" - echo " </ul>" - echo "</div>" - - echo "${intro}" - - echo "<h2>Content</h2>" - - echo "<h3>Titan</h3>" - echo "${titan}" - - echo "<h3>Random01</h3>" - echo "<div class=\"img\" style=\"width: 17em\">" - echo " <a href=\"random01_visible.jpg\">" - echo " <img src=\"random01_visible.jpg\" alt=\"random01_visible\">" - echo " </a>" - echo " <a href=\"random01_LW_10-12um.jpg\">" - echo " <img src=\"random01_LW_10-12um.jpg\" alt=\"random01_LW_10-12um\">" - echo " </a>" - echo " <div class=\"caption\">" - echo " Images rendered by <a" - echo " href=\"man/man1/htrdr-planets.1.html\">htrdr-planets</a> from the random01" - echo " dataset. The infrared image (bottom) is a map of brightness temperature, in" - echo " Kelvins. Cold zones (in altitude) or highly reflective (i.e. weakly emitting)" - echo " zones are made visible because of their lower specific intensity." - echo " </div>" - echo "</div>" - - echo "${random01}" - - echo "<h3><code style=\"color: black\">sun_intensity_lite.bin</code></h3>" - echo "${sun_intensity_lite}" - - echo "${copying}" + # shellcheck disable=SC2016 + sed -n '0,/^## Content/p' "$1" | sed '$d' | sed 's/${VERSION}/'"$2"'/g' - print_footer + printf '[![Random01 Visible](thumbs/random01_visible.jpg)](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 '[![Random01 Infrared](thumbs/random01_LW_10-12um.jpg)](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/random01_LW_10-12um.jpg b/htrdr/images/random01_LW_10-12um.jpg diff --git a/htrdr/random01_visible.jpg b/htrdr/images/random01_visible.jpg diff --git a/htrdr/thumbs/random01_LW_10-12um.jpg b/htrdr/thumbs/random01_LW_10-12um.jpg @@ -0,0 +1 @@ +#$# git-wad a7d84c1a919c23e0dce7b5030eeee6519ece1108d9200f25483cd2500e4f1a8a 44004 +\ No newline at end of file diff --git a/htrdr/thumbs/random01_visible.jpg b/htrdr/thumbs/random01_visible.jpg @@ -0,0 +1 @@ +#$# git-wad 077669104328c9c56b6c3d55c89640f3f24f7c78369d9a3a47dd7ba6928cc10c 43524 +\ No newline at end of file