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

htrdr: translate the Combustion SPK into markdown

In fact, it's its editing that's now based on Markdown rather than
directly on HTML.

Diffstat:
Mhtrdr/.gitignore | 1+
Mhtrdr/Makefile | 29++++++++++++++---------------
Dhtrdr/dummy_medium_clip.png | 2--
Mhtrdr/htrdr_build.sh | 162++++++++++++++++++++++++++++---------------------------------------------------
Rhtrdr/dummy_medium.jpg -> htrdr/images/dummy_medium.jpg | 0
Rhtrdr/dummy_medium_clipped.jpg -> htrdr/images/dummy_medium_clipped.jpg | 0
Rhtrdr/gulder_lateral.jpg -> htrdr/images/gulder_lateral.jpg | 0
Ahtrdr/thumbs/dummy_medium.jpg | 2++
Ahtrdr/thumbs/dummy_medium_clipped.jpg | 2++
Ahtrdr/thumbs/gulder_lateral.jpg | 2++
10 files changed, 79 insertions(+), 121 deletions(-)

diff --git a/htrdr/.gitignore b/htrdr/.gitignore @@ -4,6 +4,7 @@ htrdr-docs.html htrdr-mods.html htrdr-atmosphere-spk.md htrdr-atmosphere-spk.html +htrdr-combustion-spk.md htrdr-combustion-spk.html htrdr-planets-spk.html htrdr-*-GNU-Linux64/ diff --git a/htrdr/Makefile b/htrdr/Makefile @@ -114,9 +114,12 @@ ATMSPK_IMG=\ city.jpg COMSPK_IMG=\ - dummy_medium.jpg\ - dummy_medium_clipped.jpg\ - gulder_lateral.jpg + 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=\ random01_visible.jpg\ @@ -200,13 +203,9 @@ 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 +htrdr-atmosphere-spk.md: $(ATMSPK_IMG) $(ATMSPK_SIG) $(ATMSPK_README) htrdr_build.sh @echo "Building $@" - @$(SHELL) htrdr_build.sh atmspk $(ATMSPK_README) $(ATMSPK_VERSION) > $@ + @$(SHELL) htrdr_build.sh atmspk $(ATMSPK_README) > $@ $(ATMSPK_README): @echo "Extracting data from $(ATMSPK_ARCH)" @@ -215,13 +214,13 @@ $(ATMSPK_README): ################################################################################ # Combustion Starter-Pack ################################################################################ -htrdr-combustion-spk.html: \ - $(COMSPK_IMG) \ - $(COMSPK_SIG) \ - $(COMSPK_README) \ - htrdr_build.sh +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) > $@ + @$(SHELL) htrdr_build.sh comspk $(COMSPK_README) $(COMSPK_VERSION)> $@ $(COMSPK_README): @echo "Extracting data from $(COMSPK_ARCH)" diff --git a/htrdr/dummy_medium_clip.png b/htrdr/dummy_medium_clip.png @@ -1 +0,0 @@ -#$# git-wad 9be6773f7c00a9d624adced11b7594000f662f6e3ded9b9f106786f93fc2fd88 171106 -\ No newline at end of file diff --git a/htrdr/htrdr_build.sh b/htrdr/htrdr_build.sh @@ -17,6 +17,22 @@ . ../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() { @@ -60,8 +76,8 @@ atmspk2() atmspk() { - if [ $# -lt 2 ]; then - printf "Usage: %s atmspk <readme> <version>\n" "$0" >&2 + if [ $# -lt 1 ]; then + printf "Usage: %s atmspk <readme>\n" "$0" >&2 exit 1 fi @@ -70,6 +86,7 @@ atmspk() printf '[![City thin lens](thumbs/city_thin_lens.jpg)](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' @@ -106,6 +123,7 @@ atmspk() printf '[![Fire](thumbs/L25_Fire.jpg)](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' @@ -113,6 +131,13 @@ atmspk() 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 @@ -120,115 +145,44 @@ comspk() 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>Gulder<\/h2>/q' \ - | sed -e '1d' -e '$d' \ - | sed '0,/<code>htrdr<\/code>/s//<a href=man\/man1\/htrdr.1.html>htrdr<\/a>/') - gulder=$(echo "${readme}" \ - | sed -n '/^<h2>Gulder<\/h2>/,/^<h2>Dummy medium<\/h2>/p' \ - | sed -e '1d' -e '$d' \ - | sed '0,/<code>htrdr<\/code>/s//<a href=man\/man1\/htrdr.1.html>htrdr<\/a>/' \ - | sed '0,/<code>htrdr-combustion<\/code>/s//<a href=man\/man1\/htrdr-combustion.1.html>htrdr-combustion<\/a>/') - dummy=$(echo "${readme}" \ - | sed -n '/^<h2>Dummy medium<\/h2>/,/^<h2>Validation program<\/h2>/p' \ - | sed -e '1d' -e '$d' \ - | sed '0,/<code>htrdr<\/code>/s//<a href=man\/man1\/htrdr.1.html>htrdr<\/a>/' \ - | sed '0,/<code>htrdr-combustion<\/code>/s//<a href=man\/man1\/htrdr-combustion.1.html>htrdr-combustion<\/a>/') - validation=$(echo "${readme}" \ - | sed -n '/^<h2>Validation program<\/h2>/,/^<h2>Release notes<\/h2>/p' \ - | sed -e '$d' \ - | sed '0,/<code>htrdr<\/code>/s//<a href=man\/man1\/htrdr.1.html>htrdr<\/a>/' \ - | sed '0,/<code>htrdr-combustion<\/code>/s//<a href=man\/man1\/htrdr-combustion.1.html>htrdr-combustion<\/a>/') - release_notes=$(echo "${readme}" \ - | sed -n '/^<h2>Release notes<\/h2>/,/^<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 Combustion-Starter-Pack -r ../ - - echo "<header>" - echo " <h1>Combustion Starter Pack</h1>" - echo "</header>" - echo "<div class=\"news\">" - echo " <p><b>Combustion Starter Pack $2</b></p>" - echo " <ul>" - echo " <li><a href=\"downloads/htrdr-Combustion-Starter-Pack-$2.tar.gz\">tarball</a> /" - echo " <a href=\"downloads/htrdr-Combustion-Starter-Pack-$2.tar.gz.sig\">pgp</a></li>" - echo " </ul>" - echo "</div>" + # 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' - echo "${intro}" - - echo "<h2>Gülder</h2>" - echo "<div class=\"img\" style=\"width: 17em\">" - echo " <a href=\"gulder_lateral.jpg\">" - echo " <img src=\"gulder_lateral.jpg\" alt=\"gulder_lateral\">" - echo " </a>" - echo " <div class=\"caption\">" - echo " Rendering in the visible range of the Gülder flame calculated by <a" - echo " href=\"man/man1/htrdr-combustion.1.html\">htrdr-combustion</a>. The flame is" - echo " illuminated by a vertical laser sheet that crosses the central axis of the" - echo " flame, from left to right.The image displays the radiation emitted by the" - echo " laser, scattered and transmitted by the combustion medium for " - echo " wavelength (here 532&nbsp;nm)." - echo " </div>" - echo " </div>" - echo "${gulder}" - - echo "<h2>Dummy medium</h2>" - echo "<div class=\"img\" style=\"width: 20em\">" - echo " <div style=\"width: 49.5%; float: left; padding-right: 1%\">" - echo " <a href=\"dummy_medium.jpg\">" - echo " <img src=\"dummy_medium.jpg\" alt=\"dummy_medium\">" - echo " </a>" - echo " </div>" - echo " <div style=\"width: 49.5%; float: left; padding-right: 0%\">" - echo " <a href=\"dummy_medium_clipped.jpg\">" - echo " <img src=\"dummy_medium_clipped.jpg\" alt=\"dummy_medium_clipped\">" - echo " </a>" - echo " </div>" - echo "" - echo " <div class=\"caption\">Illustration of the dummy medium provided in the" - echo " Starter Pack. This medium is illuminated by a laser sheet whose surface of" - echo " emission is here represented in red. The image on the left shows the" - echo " entire medium. In the image on the right, the medium is clipped along the y axis" - echo " to emphasize the axisymmetric profile of its soot volume fraction.</div>" - echo "</div>" + printf '## Downloads\n' - echo "${dummy}" - echo "${validation}" + archs=$(find downloads -name "htrdr-Combustion-Starter-Pack*.tar.gz" | sort -r) + printf '%s\n' "${archs}" | list_starter_packs - echo "<h2>Donwloads</h2>" + sed -n '/^## Gulder/,/^## Dummy medium/p' "$1" | sed '$d' - echo "<table class=\"list\">" - echo " <tr>" - echo " <th>Version</th>" - echo " <th>Archive</th>" - echo " </tr>" + printf '[![Gulder Lateral](thumbs/gulder_lateral.jpg)](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' - archs=$(find downloads -name "htrdr-Combustion-Starter-Pack*.tar.gz" | sort -r) - echo "${archs}" | - while read -r i ; do - version=$(echo "${i}" | sed "s/.*Starter-Pack-\(.*\)\.tar.gz/\1/g") - echo " <tr>" - echo " <td>${version}</td>" - echo " <td>" - echo " [<a href=\"${i}\">tarball</a>]" - if [ -f "${i}.sig" ]; then - echo " [<a href=\"${i}.sig\">pgp</a>]" - fi - echo " </td>" - echo " </tr>" - done - echo "</table>" + sed -n '/^## Dummy medium/,/^## Validation program/p' "$1" | sed '$d' - echo "${release_notes}" - echo "${copying}" + printf '[![Dummy medium](thumbs/dummy_medium.jpg)](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 '[![Clipped Dummy medium](thumbs/dummy_medium_clipped.jpg)](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' - print_footer + # shellcheck disable=SC2016 + sed -n '/^## Validation program/,$p' "$1" | sed 's/${VERSION}/'"$2"'/g' } planetsspk() diff --git a/htrdr/dummy_medium.jpg b/htrdr/images/dummy_medium.jpg diff --git a/htrdr/dummy_medium_clipped.jpg b/htrdr/images/dummy_medium_clipped.jpg diff --git a/htrdr/gulder_lateral.jpg b/htrdr/images/gulder_lateral.jpg diff --git a/htrdr/thumbs/dummy_medium.jpg b/htrdr/thumbs/dummy_medium.jpg @@ -0,0 +1 @@ +#$# git-wad a97f790a17ba36283ef49c95fa8d22d8d274a808ee8af02ca04cd6bc35ad0c66 12965 +\ No newline at end of file diff --git a/htrdr/thumbs/dummy_medium_clipped.jpg b/htrdr/thumbs/dummy_medium_clipped.jpg @@ -0,0 +1 @@ +#$# git-wad 67c527566e86415568aacfbbbcf9cda0f95556a292ac57227585c36cb73f5fd3 12102 +\ No newline at end of file diff --git a/htrdr/thumbs/gulder_lateral.jpg b/htrdr/thumbs/gulder_lateral.jpg @@ -0,0 +1 @@ +#$# git-wad 4716a37631274e70af587df56793ab6331895092a67bc139365407ece91e5259 9924 +\ No newline at end of file