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 f962e7b6a0635570b2e8dee051beacbd11777d40
parent bf92ba4ece0d650596412579601d61e1f809a54f
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed, 21 Nov 2018 11:04:03 +0100

Add script that generate the High-Tune section

Diffstat:
MMakefile | 2+-
Ahigh-tune/Makefile | 32++++++++++++++++++++++++++++++++
Ahigh-tune/high-tune.html | 156+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mhigh-tune/high-tune.html.in | 35+++++++++++++++++++++--------------
Ahigh-tune/high-tune.sh | 84+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mmeso-menu.sh | 107++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
Mschiff/schiff.sh | 41+----------------------------------------
Msolstice/solstice.sh | 50+-------------------------------------------------
Mstar-engine/star-engine.html.in | 2+-
9 files changed, 403 insertions(+), 106 deletions(-)

diff --git a/Makefile b/Makefile @@ -14,7 +14,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. REMOTE=OVH:www/projects2 -SUBDIRS=schiff solstice star-engine stardis kspectrum misc +SUBDIRS=schiff solstice star-engine stardis kspectrum misc high-tune .PHONY: default all publish default: all diff --git a/high-tune/Makefile b/high-tune/Makefile @@ -0,0 +1,32 @@ +# Copyright (C) 2018 |Meso|Star> +# +# 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/>. + +HTRDR-VERSION=0.0.0 + +SRC = high-tune.html.in high-tune.sh +IMG = DZVAR.png + +.PHONY: all clean default publish +default: all + +all: ${SRC} + @sh high-tune.sh ${HTRDR-VERSION} + +publish: + rsync -avzr high-tune.html ${IMG} downloads man ${REMOTE}/high-tune/ + +clean: + rm -rf high-tune.html downloads/*.sig man + diff --git a/high-tune/high-tune.html b/high-tune/high-tune.html @@ -0,0 +1,156 @@ +<!DOCTYPE html> + +<html lang=en> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>|M|S&gt; High-Tune</title> + <link rel="stylesheet" title="default" href="../meso.css"> +</head> + +<body> +<div id="menu"> + <h2><a href=../misc/about.html>About</a></h2> + <h2>High-Tune</h2> + <div id=sub-menu> + <ul> + <li id=cur>Overview</li> + <li>Reference documentation</li> + </ul> + <ul id=lvl2> + <li><a href="../high-tune/man/man1/htrdr.1.html">htrdr</a></li> + <li><a href="../high-tune/man/man5/htrdr-image.5.html">htrdr-image</a></li> + <li><a href="../high-tune/man/man1/les2htcp.1.html">les2htcp</a></li> + <li><a href="../high-tune/man/man5/htcp.5.html">htcp</a></li> + <li><a href="../high-tune/man/man5/htmie.5.html">htmie</a></li> + <li><a href="../high-tune/man/man1/htpp.1.html">htpp</a></li> + </ul> + <ul> + <li><a href=https://gitlab.com/meso-star/htrdr>Source code repository</a></li> + </ul> + <div id="info"> + <p>High-Tune copyright &#169; 2018 + <a href="https://www.meso-star.com">|Méso|Star&gt;</a>, + National Center for Scientific Research (CNRS), + Université Paul Sabatier. + </div> + </div> + <h2><a href=../kspectrum/kspectrum.html>Kspectrum</a></h2> + <h2><a href=../schiff/schiff.html>Schiff</a></h2> + <h2><a href=../solstice/solstice.html>Solstice</a></h2> + <h2><a href=../stardis/stardis.html>Stardis</a></h2> + <h2><a href=../star-engine/star-engine.html>Star-Engine</a></h2> + <h2><a href=../misc/pgp_signatures.html>PGP signatures</a></h2> +</div> +<div id=content> +<header> + <h1>HTRDR - Image renderer of cloudy atmospheres</h1> +</header> + +<div class="news"> + <p><b>High-Tune: RenDeRer 0.0.0</b></p> + <ul> + <li>GNU/Linux: + <a href="downloads/High-Tune-0.0.0-GNU-Linux64.tar.gz">tarball</a> / + <a href="downloads/High-Tune-0.0.0-GNU-Linux64.tar.gz.sig">pgp</a></li> + <li>Sources: + <a href="downloads/High-Tune-0.0.0-Sources.tar.gz">tarball</a> / + <a href="downloads/High-Tune-0.0.0-Sources.tar.gz.sig">pgp</a></li> + </ul> +</div> + +<p>High Tune: RenDeRer (<code>htrdr</code>) is a part of the <a +href=http://www.umr-cnrm.fr/high-tune/>High-Tune</a> project: it illustrates +the implementation of efficient <b>radiative transfer</b> algorithms in +<b>inhomogeneous media</b>. It is actually an <b>image renderer</b> in the +visible part of the spectrum, for scenes composed of an atmospheric gas +mixture, clouds and a ground. It uses spectral data that should be provided for +the pressure and temperature atmospheric vertical profile, the liquid water +content in suspension within the clouds that is a result of Large Eddy +Simulation computations, and the optical properties of water droplets that have +been obtained from a Mie code. + +<p><code>htrdr</code> evaluates the intensity incoming on each pixel of the +sensor array. The underlying algorithm is based on a <b>Monte-Carlo</b> method: +it consists in simulating a given number of optical paths originating from the +camera, directed into the atmosphere, taking into account light absorption and +scattering phenomena. The computation is performed over the whole visible part +of the spectrum, for the three components of the CIE 1931 XYZ colorimetric +space that are subsequently recombined in order to obtain the final color for +each pixel, and finally the whole image of the scene as seen from the required +observation position. + +<p>During the simulation, <code>htrdr</code> <b>dynamically loads/unloads</b> +cloud properties and thus it can handle clouds whose data do not feat in main +memory. Furthermore, in addition of a <b>shared memory parallelism</b>, +<code>htrdr</code> relies on the <a href="https://www.mpi-forum.org/">Message +Passing Interface</a> specification to parallelise its computations in a +<b>distribute memory</b> environment; the <code>htrdr</code> binary can thus be +run either directly or through a MPI process launcher like <code>mpirun</code>. + +<h2>A straight interface</h2> + +<div class="img" style="width: 16em"> + <a href="DZVAR.png"> + <img src="DZVAR.png" alt="Repeated clouds"> + </a> + <div class="caption"> + Examples of cloudy scene rendered with <code>htrdr</code> + </div> +</div> + +<p><code>htrdr</code> is a <b>command-line tool</b> that performs computations +on input data, writes the rendered image and nothing more. No assumption is +made on how input data are created excepted that they have to follow the +expected file formats. In the same spirit, the output image is written in plain +text, as a list of raw pixel estimations, making easier the processing of its +data. + +<p>This thin interface is, by nature, particularly well suited to be +<b>extended</b> and <b>integrated</b> into a any workflow. For instance, one +can save the cloud properties directly in the "High-Tune: cloud properties" +format (<code>htcp</code>) or use the <code>les2htcp</code> tool to convert +cloud properties from <a +href="https://www.unidata.ucar.edu/software/netcdf/">NetCDF</a> to +<code>htcp</code>. In the same way, the output image can be post-treated +through <a href="http://www.gnuplot.info">gnuplot</a> or converted in a regular PPM +image by the <code>htpp</code> program, and then visualised in an image viewer +as for instance <a href="https://feh.finalrewind.org/">feh</a> or <a +href="https://imagemagick.org/script/display.php">display</a>. + +<h2>Quick start</h2> + +<p>Download the desired archive of <code>htrdr</code> and verify its integrity +against its <a href=../misc/pgp_signatures.html>PGP signature</a>. Then extract +it. Finally source the provided <code>high_tune.profile</code> file to register +<code>htrdr</code> against the current shell.</p> + +<pre class="code"> +$ source ~/High-Tune-RenDeRer-0.0.0-GNU-Linux64/etc/high_tune.profile +$ htrdr -h +</pre> + +<p>The <b>reference documentation</b> of the <code>htrdr</code> program and +some of its associated file formats is provided trough man pages. Use the +<code>man</code> command-line to consult it.</p> + +<pre class="code"> +$ man htrdr +$ man htrdr-image +$ man htcp +$ man htmie +</pre> + +<h2>License</h2> + +<p><code>htrdr</code> is free software released under the GPLv3+ license: GNU +GPL version 3 or later. You are welcome to redistribute it under certain +conditions; refer to the +<a href="https://www.gnu.org/licenses/gpl.html">license</a> for details.</p> +</div> +<div id=footer> +Phone: +33561556830&nbsp;&nbsp;|&nbsp;&nbsp; +<a href=mailto:contact@meso-star.com>Email us</a>&nbsp;&nbsp;|&nbsp;&nbsp; +&#169; 2015-2018 |Méso|Star&gt; +</div> +</body> diff --git a/high-tune/high-tune.html.in b/high-tune/high-tune.html.in @@ -1,18 +1,16 @@ <header> - <h1>High-Tune: RenDeRer - Image renderer of cloudy atmospheres</h1> + <h1>HTRDR - Image renderer of cloudy atmospheres</h1> </header> <div class="news"> - <p><b>Download High-Tune: RenDeRer ${VERSION}</b></p> + <p><b>High-Tune: RenDeRer ${VERSION}</b></p> <ul> <li>GNU/Linux: - <a href="downloads/High-Tune-RenDeRer-${VERSION}-GNU-Linux64.tar.gz">tarball</a> / - <a href="downloads/High-Tune-RenDeRer-${VERSION}-GNU-Linux64.tar.gz.sig">pgp</a></li> - </ul> - <ul> + <a href="downloads/High-Tune-${VERSION}-GNU-Linux64.tar.gz">tarball</a> / + <a href="downloads/High-Tune-${VERSION}-GNU-Linux64.tar.gz.sig">pgp</a></li> <li>Sources: - <a href="downloads/High-Tune-RenDeRer-${VERSION}-Sources.tar.gz">zip</a> / - <a href="downloads/High-Tune-RenDeRer-${VERSION}-Sources.tar.gz.sig">pgp</a></li> + <a href="downloads/High-Tune-${VERSION}-Sources.tar.gz">tarball</a> / + <a href="downloads/High-Tune-${VERSION}-Sources.tar.gz.sig">pgp</a></li> </ul> </div> @@ -45,7 +43,16 @@ Passing Interface</a> specification to parallelise its computations in a <b>distribute memory</b> environment; the <code>htrdr</code> binary can thus be run either directly or through a MPI process launcher like <code>mpirun</code>. -<h2>A simple interface</h2> +<h2>A simple and extendable interface</h2> + +<div class="img" style="width: 16em"> + <a href="DZVAR.png"> + <img src="DZVAR.png" alt="Repeated clouds"> + </a> + <div class="caption"> + Examples of cloudy scene rendered with <code>htrdr</code> + </div> +</div> <p><code>htrdr</code> is a <b>command-line tool</b> that performs computations on input data, writes the rendered image and nothing more. No assumption is @@ -61,10 +68,10 @@ format (<code>htcp</code>) or use the <code>les2htcp</code> tool to convert cloud properties from <a href="https://www.unidata.ucar.edu/software/netcdf/">NetCDF</a> to <code>htcp</code>. In the same way, the output image can be post-treated -through <a href="www.gnuplot.com">gnuplot</a> or converted in a regular PPM -image by the <code>htpp</code> program, and then directly visualised in an -image viewer as for instance <a href="https://feh.finalrewind.org/">feh</a> or -<a href="https://imagemagick.org/script/display.php">display</a>. +through <a href="http://www.gnuplot.info">gnuplot</a> or converted in a regular PPM +image by the <code>htpp</code> program, and then visualised in an image viewer +as for instance <a href="https://feh.finalrewind.org/">feh</a> or <a +href="https://imagemagick.org/script/display.php">display</a>. <h2>Quick start</h2> @@ -74,7 +81,7 @@ it. Finally source the provided <code>high_tune.profile</code> file to register <code>htrdr</code> against the current shell.</p> <pre class="code"> -$ source ~/High-Tune-RenDeRer-${VERSION}-GNU-Linux64/etc/high_tune.profile +$ source ~/High-Tune-${VERSION}-GNU-Linux64/etc/high_tune.profile $ htrdr -h </pre> diff --git a/high-tune/high-tune.sh b/high-tune/high-tune.sh @@ -0,0 +1,84 @@ +#!/bin/bash + +# Copyright (C) 2017-2018 |Meso|Star> +# +# 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 + +source ../meso-menu.sh + +if [ $# -lt 1 ]; then + echo "Usage: $0 VERSION" + exit 1 +fi + +if [ ! -f "./downloads/High-Tune-$1-GNU-Linux64.tar.gz" ]; then + echo "Cannot find ./downloads/High-Tune-$1-GNU-Linux64.tar.gz" + exit 1 +fi + +dir_curr=$(pwd) # Current directory +dir_temp=$(mktemp -d) # Working directory + +################################################################################ +# Sign the package +################################################################################ +tput bold; echo ">>> High-Tune packages"; tput sgr0 +archs=$(find "./downloads" -regex "^.*/High-Tune-[0-9]+\.[0-9]+\.[0-9]+-.*tar.gz") + +sign_something=0 +for arch in $archs; do + if [ ! -f $arch.sig ]; then + echo "Sign $arch" + gpg -a -o $arch.sig --detach-sign $arch + sign_something=1 + fi +done + +if [ $sign_something == 0 ]; then + echo "Nothing to do" +fi + +echo "" + +################################################################################ +# Generate the overview page +################################################################################ +tput bold; echo ">>> High-Tune web pages"; tput sgr0 +echo "Write high-tune.html" +{ + print_header High-Tune Overview + VERSION=$1 envsubst < high-tune.html.in; + print_footer +} > high-tune.html + +################################################################################ +# Generate the reference documentation +################################################################################ +cd $dir_temp +arch=High-Tune-$1-GNU-Linux64 +cp "$dir_curr/downloads/$arch.tar.gz" . +tar xzf $arch.tar.gz +cd $dir_curr + +for((i=0; i<${#high_tune_man_pages[@]}; ++i)); do + entry=(${high_tune_man_pages[$i]}) + man_name=${entry[0]} + man_num=${entry[1]} + man_path="$dir_temp/$arch/share/man/man${entry[1]}/$man_name.$man_num" + output="man/man${entry[1]}/$man_name.$man_num.html" + convert_man_page High-Tune "$man_path" "$output" $1 +done + diff --git a/meso-menu.sh b/meso-menu.sh @@ -28,6 +28,53 @@ schiff_man_pages=( "schiff-output 5" ) +high_tune_man_pages=( + "htrdr 1" + "htrdr-image 5" + "les2htcp 1" + "htcp 5" + "htmie 5" + "htpp 1" +) + +print_high_tune_sub_menu() { + local root=$1 + local name=$2 + + echo ' <div id=sub-menu>' + echo ' <ul>' + if [ "$name" == "Overview" ]; then + echo ' <li id=cur>Overview</li>' + else + echo " <li><a href=${root}high-tune/high-tune.html>Overview</a></li>" + fi + echo ' <li>Reference documentation</li>' + echo ' </ul>' + echo ' <ul id=lvl2>' + local i + for((i=0; i < ${#high_tune_man_pages[@]}; ++i)); do + local entry=(${high_tune_man_pages[$i]}) + if [ "$name" == "${entry[0]}" ]; then + echo " <li id=cur>$name</li>" + else + local link_path="${root}high-tune/man/man${entry[1]}/${entry[0]}.${entry[1]}.html" + echo " <li><a href=\"$link_path\">${entry[0]}</a></li>" + fi + done + echo ' </ul>' + echo ' <ul>' + echo " <li><a href=https://gitlab.com/meso-star/htrdr>Source code repository</a></li>" + echo ' </ul>' + echo ' <div id="info">' + echo ' <p>High-Tune copyright &#169; 2018' + echo ' <a href="https://www.meso-star.com">|Méso|Star&gt;</a>,' + echo ' National Center for Scientific Research (CNRS),' + echo ' Université Paul Sabatier.' + echo ' </div>' + echo ' </div>' +} + + print_schiff_sub_menu() { local root=$1 local name=$2 @@ -145,7 +192,7 @@ print_star_engine_sub_menu() { print_header() { local section=$1 - local full_name=$2 + local full_name=$2 local title=$3 local name=${full_name#man-} local is_man=$([[ $full_name =~ ^man- ]] && echo 1 || echo 0) @@ -168,6 +215,12 @@ print_header() { else echo " <h2><a href=${root}misc/about.html>About</a></h2>" fi + if [ "$section" == "High-Tune" ]; then + echo " <h2>High-Tune</h2>" + print_high_tune_sub_menu ${root} ${name} + else + echo " <h2><a href=${root}high-tune/high-tune.html>High-Tune</a></h2>" + fi if [ "$section" == "Kspectrum" ]; then echo ' <h2>Kspectrum</h2>' else @@ -260,3 +313,55 @@ print_downloads() { echo '</table>' } +convert_man_page() { + section=$1 + input=$2 + output=$3 + version=$4 + output_dir=$(dirname $output) + man_file=$(basename $input) + man_name=$(echo $man_file | sed 's/\(.*\)\.[0-7]/\1/') + man_num=$(echo $man_file | sed 's/.*\.\([0-7]\)/\1/') + + if [ ! -f "$input" ]; then + echo "Cannot find the '$input' man page." + continue + fi + + mkdir -p "${output_dir}" + + # Generate the man page + echo "Write $output" + { + print_header ${section} man-${man_name} + echo -n "<div style=\"font-variant: small-caps; float: right; color: #777777\">" + echo "Version $version</div>"; + echo "<header>" + echo " <h1>${man_name}(${man_num})</h1>"; + echo "</header>" + } > $output + + man2html -r $input \ + | tail -n +10 \ + | sed '/^<HR>$/,$d' \ + | sed '/\&nbsp;/d' \ + | sed 's/<DL COMPACT>/<DL>/g' \ + >> $output + + print_footer >> $output + + # Remove hyperlink on csplit, feh and sed commands + sed -i 's/<B><A HREF="\.\.\/man1\/csplit\.1\.html">csplit<\/A><\/B>/csplit/g' $output + sed -i 's/<B><A HREF="\.\.\/man1\/feh\.1\.html">feh<\/A><\/B>/feh/g' $output + sed -i 's/<B><A HREF="\.\.\/man1\/sed\.1\.html">sed<\/A><\/B>/sed/g' $output + + # Fix the hyperlink toward the GPLv3+ license + sed -i 's/gpl\.html\.">\(.*\).<\/A>/gpl.html">\1<\/A>./g' $output + + # Remove unexpected link on sqrt(2) + sed -i 's/<A HREF="\.\.\/man2\/sqrt\.2\.html">sqrt<\/A>/sqrt/g' $output + + # Fix the man2html issues that translates the ' char in cq + sed -i "s/cq\([a-z]\)\>/'\1/g" $output +} + diff --git a/schiff/schiff.sh b/schiff/schiff.sh @@ -92,46 +92,7 @@ for((i=0; i<${#schiff_man_pages[@]}; ++i)); do man_num=${entry[1]} man_path="$dir_temp/$arch/share/man/man${entry[1]}/$man_name.$man_num" output="man/man${entry[1]}/$man_name.$man_num.html" - - if [ ! -f "$man_path" ]; then - echo "Cannot find the '$man_path' man page." - continue - fi - - if [ ! -d man ]; then - mkdir man - fi - - if [ ! -d man/man${man_num} ]; then - mkdir man/man${man_num} - fi - - echo "Write $output" - { - print_header Schiff man-${entry[0]} - echo "<div style=\"font-variant: small-caps; float: right; color: #777777\">Version $1</div>"; - echo '<header>'; - echo " <h1>${man_name}(${man_num})</h1>"; - echo '</header>'; - } > $output - - man2html -r $man_path \ - | tail -n +10 \ - | sed '/^<HR>$/,$d' \ - | sed '/\&nbsp;/d' \ - | sed 's/<DL COMPACT>/<DL>/g' \ - >> $output - - if [ "${entry[0]}" == "schiff" ]; then - # Remove hyperlink on csplit - sed -i 's/<B><A HREF="\.\.\/man1\/csplit\.1\.html">csplit<\/A><\/B>/csplit/g' $output - fi - - # Fix the man2html issues that translates the ' char in cq - sed -i "s/cq\([a-z]\)\>/'\1/g" $output - - print_footer >> $output - + convert_man_page Schiff "$man_path" "$output" $1 done echo "" diff --git a/solstice/solstice.sh b/solstice/solstice.sh @@ -213,55 +213,7 @@ for((i=0; i<${#solstice_man_pages[@]}; ++i)); do man_num=${entry[1]} man_path=$dir_temp/$arch/share/man/man${entry[1]}/$man_name.$man_num output=man/man${entry[1]}/$man_name.$man_num.html - - if [ ! -f "$man_path" ]; then - echo "Cannot find the '$man_path' man page." - continue - fi - - if [ ! -d man ]; then - mkdir man - fi - - if [ ! -d man/man${man_num} ]; then - mkdir man/man${man_num} - fi - - echo "Write $output" - { - print_header Solstice man-${entry[0]} - echo "<div style=\"font-variant: small-caps; float: right; color: #777777\">Version $1</div>"; - echo '<header>'; - echo " <h1>${man_name}(${man_num})</h1>"; - echo '</header>'; - } > $output - - man2html -r $man_path \ - | tail -n +30 \ - | sed '/^<HR>$/,$d' \ - | sed '/\&nbsp;/d' \ - | sed 's/<DL COMPACT>/<DL>/g' \ - >> $output - - if [ "${entry[0]}" == "solstice" ]; then - # Remove hyperlink on csplit, feh and sed commands - sed -i 's/<B><A HREF="\.\.\/man1\/csplit\.1\.html">csplit<\/A><\/B>/csplit/g' $output - sed -i 's/<B><A HREF="\.\.\/man1\/feh\.1\.html">feh<\/A><\/B>/feh/g' $output - sed -i 's/<B><A HREF="\.\.\/man1\/sed\.1\.html">sed<\/A><\/B>/sed/g' $output - - # Fix the hyperlink toward the GPLv3+ license - sed -i 's/gpl\.html\.">\(.*\).<\/A>/gpl.html">\1<\/A>./g' $output - fi - - if [ "${entry[0]}" == "solstice-input" ]; then - # Remove unexpected link on sqrt(2) - sed -i 's/<A HREF="\.\.\/man2\/sqrt\.2\.html">sqrt<\/A>/sqrt/g' $output - fi - - # Fix the man2html issues that translates the ' char in cq - sed -i "s/cq\([a-z]\)\>/'\1/g" $output - - print_footer >> $output + convert_man_page Solstice "$man_path" "$output" $1 done echo "" diff --git a/star-engine/star-engine.html.in b/star-engine/star-engine.html.in @@ -185,7 +185,7 @@ project(my_project C) # Use CMake packages to check and add project dependencies find_package(Star3D REQUIRED) find_package(StarSP REQUIRED) -include_directories(${Star3D_INCLUDE_DIR} ${StarSP_INCLUDE_DIR}) +include_directories(&#36;{Star3D_INCLUDE_DIR} &#36;{StarSP_INCLUDE_DIR}) # Define the program to build add_executable(my_program main.c)