commit 3e3796f7494efb2ae45a1723182775fa94b36e6f
parent 805f6beaac8e7af8657fa9c53a1c624085fa7230
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 8 Nov 2023 09:25:18 +0100
htrdr: release version 0.10
In this version, the manual pages have been translated into mdoc. A new
mandoc-based conversion script is therefore provided to generate html
man pages from mdoc sources. The CSS has been updated for the
composition of these man pages.
The installation procedure has finally been rewritten, due to the use of
POSIX make rather than CMake as the build system for htrdr sources.
Note that the htrdr-0.10 archive contains only the resources needed to
generate the htrdr web pages, i.e. the htrdr README file and the manual
pages. Until now, the archive was a complete version which was totally
useless, as it was not provided as a download.
Diffstat:
10 files changed, 262 insertions(+), 103 deletions(-)
diff --git a/Makefile b/Makefile
@@ -24,6 +24,7 @@ SCRIPTS=\
configure.sh\
configure_targets.sh\
convert_man.sh\
+ convert_mdoc.sh\
meso-menu.sh
build:
diff --git a/configure_targets.sh b/configure_targets.sh
@@ -58,5 +58,27 @@ man()
done
}
-"$@"
+mdoc()
+{
+ if [ $# -lt 1 ]; then
+ printf "Usage: %s <section> [mdoc ...]" "$0" >&2
+ exit 1
+ fi
+
+ section=$1
+ dir=$(dirname "$0")
+
+ shift 1
+ for i in "$@"; do \
+ mdoc=${i#*share/}.html
+ printf "man: %s\n" "${mdoc}"
+ printf "%s: %s %s/meso-menu.sh %s/convert_mdoc.sh\n" \
+ "${mdoc}" "${i}" "${dir}" "${dir}"
+ printf "\t@echo \"Building %s\"\n" "${mdoc}"
+ printf "\t@mkdir -p %s\n" "${mdoc%/*}"
+ printf "\t@PATH+=:%s sh convert_mdoc.sh %s %s %s\n" \
+ "${dir}" "${section}" "${i}" "${mdoc}"
+ done
+}
+"$@"
diff --git a/convert_mdoc.sh b/convert_mdoc.sh
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+# Copyright (C) 2017-2023 |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="${HOME}/docs/meso-star/meso-web/"
+
+{
+ 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-planeto/"Nm">htrdr\‑planeto/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'
+
+ print_footer
+} > "${output}"
+
+sh lint_html.sh "${output}"
diff --git a/htrdr/Makefile b/htrdr/Makefile
@@ -16,7 +16,7 @@
include ../config.mk
-HTRDR_VERSION=0.9.2
+HTRDR_VERSION=0.10
HTRDR_DIR=htrdr-$(HTRDR_VERSION)-GNU-Linux64
HTRDR_ARCH=downloads/$(HTRDR_DIR).tar.gz
HTRDR_README=$(HTRDR_DIR)/share/doc/htrdr/README.md
@@ -276,5 +276,5 @@ lint_shells:
@$(SHELL) ../configure_targets.sh lint $(HTML) > .lint
.man: Makefile ../configure_targets.sh
- @echo "Setup .man"
- @$(SHELL) ../configure_targets.sh man htrdr $(HTRDR_VERSION) $(MAN) > .man
+ @echo "Setup .mdoc"
+ @$(SHELL) ../configure_targets.sh mdoc htrdr $(MAN) > $@
diff --git a/htrdr/downloads/htrdr-0.10-GNU-Linux64.tar.gz b/htrdr/downloads/htrdr-0.10-GNU-Linux64.tar.gz
@@ -0,0 +1 @@
+#$# git-wad 558076a6de5b5bdbffe50c3bcb96a6280acfbe6c5d83461474fd82c21f08177c 33674
+\ No newline at end of file
diff --git a/htrdr/htrdr.html.in b/htrdr/htrdr.html.in
@@ -9,9 +9,7 @@
<div class="news">
<p><b><code>htrdr</code> ${VERSION} is available</b></p>
<ul>
- <li>Build from sources:
- <a href=https://gitlab.com/meso-star/star-engine/tree/htrdr-${VERSION}>
- git</a>
+ <li><a href="#INSTALL">Install</a> from source
</li>
</ul>
</div>
@@ -263,7 +261,7 @@ 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>
+<h2 id="INSTALL">Installation</h2>
<div class="img" style="width: 20em">
<a href="gulder_horizontal_slides.jpg">
@@ -306,69 +304,62 @@ href="https://imagemagick.org/script/display.php">display</a>.
</div>
<p>No pre-compiled version of <code>htrdr</code> is provided; it must be
-compiled directly from its source tree. A simple way is to rely on the
-<code>htrdr</code> branch of the <a
-href="https://gitlab.com/meso-star/star-engine/tree/htrdr">Star-Engine</a>
-project: it provides CMake scripts that automate the download, the compilation
-and the installation of <code>htrdr</code> and its dependencies. This build
-procedure assumes the following prerequisites:
+compiled directly from its source tree. A simple way is to rely on
+<a href="https://gitlab.com/meso-star/star-build/">star-build</a>,
+which automates the build and installation of <code>htrdr</code> and its
+dependencies from source code.
+
+<h3>Prerequisites</h3>
+
+<p>To build <code>htrdr</code> with <code>star-build</code>, first make
+sure your system has the following prerequisites:</p>
<ul>
+ <li>POSIX shell</li>
+ <li>POSIX make</li>
+ <li>curl</li>
+ <li>git</li>
+ <li>mandoc</li>
<li>pkg-config</li>
- <li><a href="https://cmake.org">CMake</a> in version 3.5 or higher.</li>
- <li><a href=https://git-scm.com>git</a> source control.</li>
- <li><a href=https://gcc.gnu.org>GNU Compiler Collection</a> in version 7 or
- higher.</li>
- <li><a href=https://www.unidata.ucar.edu/software/netcdf/>NetCDF</a> library
- and headers in version 4 or higher.</li>
- <li><a href=https://www.open-mpi.org/>OpenMPI</a> library and headers in
- version 2 or higher.</li>
- <li>Optionally, the <a href="https://sr.ht/~sircmpwn/scdoc/">scdoc</a>
- tool to generate the reference documentation man pages.</li>
+ <li>sha512sum</li>
+ <li>GNU Compiler Collection in version 8.3 or higher</li>
+ <li>netCDF4 library and headers</li>
+ <li>OpenMPI library and headers in version 2 or higher</li>
</ul>
<h3>Build</h3>
-<p>Assuming that the aforementioned prerequisites are available, the build
-procedure is summed up to:
+<p>Assuming that the aforementioned prerequisites are available, the
+build procedure is summed up to:</p>
<pre class="code">
-~ $ git clone -b htrdr-${VERSION}\
- https://gitlab.com/meso-star/star-engine.git\
- htrdr-${VERSION}
-~ $ mkdir htrdr-${VERSION}/build
-~ $ cd htrdr-${VERSION}/build
-~/htrdr-${VERSION}/build $ cmake ../cmake
-~/htrdr-${VERSION}/build $ make
+~ $ git clone \
+ https://gitlab.com/meso-star/star-build.git
+~/star-build $ cd star-build
+~/star-build $ make \
+ PREFIX=~/htrdr_${VERSION} \
+ BUILD=src/htrdr_${VERSION}.sh
</pre>
-<h4>Tune the build</h4>
+<p>With <code>PREFIX</code> defining the path where <code>htrdr</code>
+will be installed and <code>BUILD</code> defining the installation
+script to be run.</p>
-<p>By default, the whole <code>htrdr</code> project is built but you may prefer
-to deploy <code>htrdr</code> only for a specific application, i.e. only for
-atmospheric radiative transfer, combustion processes or planetology. In this
-case, only activate the desired application during the CMake configuration
-step. For example, to install only the atmospheric part of
+<p>By default, the whole <code>htrdr</code> project is built but you may
+prefer to deploy <code>htrdr</code> only for a specific application,
+i.e. only for atmospheric radiative transfer, combustion processes or
+planetology. For example, to install only the atmospheric part of
<code>htrdr</code>:</p>
<pre class="code">
-~ $ git clone -b htrdr-${VERSION}\
- https://gitlab.com/meso-star/star-engine.git\
- htrdr-${VERSION}
-~ $ mkdir htrdr-${VERSION}/build
-~ $ cd htrdr-${VERSION}/build
-~/htrdr-${VERSION}/build $ cmake ../cmake\
- -DHTRDR_BUILD_ATMOSPHERE=On\
- -DHTRDR_BUILD_COMBUSTION=Off\
- -DHTRDR_BUILD_PLANETO=Off
-~/htrdr-${VERSION}/build $ make
+~/star-build $ make \
+ PREFIX=~/htrdr_${VERSION} \
+ BUILD=src/htrdr_${VERSION}.sh \
+ ATMOSPHERE=ENABLE \
+ COMBUSTION=DISABLE \
+ PLANETO=DISABLE
</pre>
-<p>Visit the Star-Engine <a
-href="https://gitlab.com/meso-star/star-engine/-/tree/htrdr"> git
-repository</a> of <code>htrdr</code> for a complete description of the build
-process and available options.</p>
-
<div class="img" style="width: 20em">
<div style="width: 49.5%; float: left; padding-right: 1%" >
<a href="downward_flux_500x500x2048_sw_380_4000_879.349.jpg">
@@ -400,45 +391,20 @@ process and available options.</p>
<h3>Run</h3>
-<p>By default <code>htrdr</code> is installed in the <code>local</code>
-subdirectory of <code>htrdr-${VERSION}</code>. Evaluate the provided
-<code>htrdr.profile</code> file in the current shell to register
-<code>htrdr</code> against it.</p>
+<p>Evaluate the installed <code>htrdr.profile</code> file in the current
+shell to register <code>htrdr</code> against it. You can then run
+<code>htrdr</code> and consult its manual pages:</p>
<pre class="code">
-~ $ . ~/htrdr-${VERSION}/local/etc/htrdr.profile
+~ $ . ~/htrdr-${VERSION}/etc/htrdr.profile
~ $ htrdr -h
-</pre>
-
-<p>If the <a href="https://sr.ht/~sircmpwn/scdoc/">scdoc</a> tool was installed
-on <code>make</code> invocation, the <b>reference documentation</b> of the
-<code>htrdr</code> program and its associated file formats should be available
-through man pages. Use the <code>man</code> command-line to consult them. For
-example:</p>
-
-<pre class="code">
~ $ man htrdr
-~ $ man htrdr-atmosphere
-~ $ man htrdr-combustion
-~ $ man htrdr-planeto
</pre>
<p>Refer to the Starter Packs to quickly run a
<code>htrdr</code> rendering; these archives provide input data and scripts
that are good starting points to use <code>htrdr</code>.
-<h3>Package</h3>
-
-<p>Once built, the <code>htrdr</code> installation can be packaged in an
-archive that can then be deployed on compatible systems, <i>i.e.</i> systems
-whose C library, NetCDF library and MPI implementation are compatibles with the
-ones available on the system used to build <code>htrdr</code>.
-
-<pre class="code">
-~/htrdr-${VERSION}/build $ make pkg
-~/htrdr-${VERSION}/build $ ls package/htrdr-${VERSION}*
-</pre>
-
${RELEASE_NOTES}
${COPYING}
diff --git a/meso-menu.sh b/meso-menu.sh
@@ -126,9 +126,9 @@ print_htrdr_sub_menu() {
echo " <li><a href=\"${root}htrdr/htrdr-mods.html\">Modifications</a></li>"
fi
if [ "${name}" = "Documentations" ]; then
- echo " <li id=\"cur\">Reference documentation</li>"
+ echo " <li id=\"cur\">Manual pages</li>"
else
- echo " <li><a href=\"${root}htrdr/htrdr-docs.html\">Reference documentation</a></li>"
+ echo " <li><a href=\"${root}htrdr/htrdr-docs.html\">Manual pages</a></li>"
fi
echo " <li>Starter Pack"
echo " <ul class=\"lvl2\">"
@@ -410,7 +410,6 @@ print_header() {
echo "<body>"
echo "<aside id=\"menu\"><nav>"
-#echo "<div id=\"menu\">"
if [ "${section}" = "Home" ]; then
echo " <h2>Home</h2>"
print_home_sub_menu "${root}" "${name}"
@@ -454,7 +453,6 @@ print_header() {
echo " <h2><a href=\"${root}star-engine/star-engine.html\">Star-Engine</a></h2>"
fi
echo "<br>" # Enable CSS overflow here
-#echo "</div>"
echo "</nav></aside>"
echo "<div id=\"content\">"
}
@@ -489,7 +487,7 @@ print_downloads() {
esac
fi
- echo "<table>"
+ echo "<table class=\"list\">"
echo " <tr>"
echo " <th>Version</th>"
[ ! "${linux}" -eq 0 ] && echo " <th>GNU/Linux 64-bits</th>"
diff --git a/meso.css b/meso.css
@@ -294,14 +294,12 @@ hr {
/*******************************************************************************
* Table
******************************************************************************/
-td {
- padding: 0em 2em 0em 2em;
- margin: 0em;
- text-align: center;
+table.list {
+ border-spacing: 0;
+ width: 100%;
}
-
-th {
+th.list {
font-variant: small-caps;
padding: 0.5em 2em 0.5em 2em;
margin: 0em;
@@ -309,12 +307,18 @@ th {
background-color: #ffffff;
}
-tr:nth-child(2n+1) {
+.list tr:nth-child(2n+1) {
background-color: #F7F6F1;
}
-table {
- border-spacing: 0;
+td.list {
+ padding: 0em 2em 0em 2em;
+ margin: 0em;
+ text-align: center;
+}
+
+td {
+ vertical-align: top;
}
/*******************************************************************************
@@ -361,10 +365,10 @@ input[type=number] {
}
.app
-input[type=number]::-webkit-inner-spin-button,
-input[type=number]::-webkit-outer-spin-button {
- -webkit-appearance: none;
- margin: 0;
+input[type=number]::-webkit-inner-spin-button,
+input[type=number]::-webkit-outer-spin-button {
+ -webkit-appearance: none;
+ margin: 0;
}
.app input[type=number]:focus {
@@ -423,3 +427,115 @@ input[type=number]::-webkit-outer-spin-button {
.popup .show {
visibility: visible;
}
+
+/*******************************************************************************
+ * Mandoc
+ * CSS derivative written by Ingo Schwarze <schwarze@openbsd.org> for
+ * OpenBSD man pages
+ ******************************************************************************/
+.manual-text {
+ margin-left: 6em;
+}
+
+h1.Sh {
+ font-size: 1.5em;
+ margin-left: -4em;
+}
+
+h2.Ss {
+ font-size: 1.5em;
+ margin-left: -2.0em;
+ border-bottom: none;
+ padding: 0em;
+}
+
+code.In, code.Nm, .Cm, .Fd, .Fl, .Fn, .Ic {
+ font-style: normal;
+ font-weight: bold;
+}
+
+.permalink {
+ border-bottom: thin dotted;
+ color: inherit;
+ font: inherit;
+ text-decoration: inherit;
+}
+
+.Nd, .Bf, .Op { display: inline; }
+.Pa, .Ad { font-style: italic; }
+.Ms { font-weight: bold; }
+
+/* Tables */
+table.head, table.foot { width: 100%; border-spacing: 0; }
+td.head-rtitle, td.foot-os { text-align: right; }
+td.head-vol { text-align: center; }
+td.head-ltitle { margin: 0em; padding: 0em; text-align: left; }
+
+/* Display and lists */
+.Bd-indent { margin-left: 3.8em; }
+.Bl-bullet { list-style-type: disc; padding-left: 1em; }
+.Bl-bullet > li { }
+.Bl-dash { list-style-type: none; padding-left: 0em; }
+.Bl-dash > li { text-indent: -1.3em; }
+.Bl-dash > li:before { content: "\2014 "; }
+.Bl-item { list-style-type: none; padding-left: 0em; }
+.Bl-item > li { }
+.Bl-compact > li { margin-top: 0em; }
+.Bl-enum { padding-left: 2em; }
+.Bl-enum > li { }
+.Bl-compact > li { margin-top: 0em; }
+.Bl-diag { }
+.Bl-diag > dt { font-style: normal; font-weight: bold; }
+.Bl-diag > dd { margin-left: 0em; }
+.Bl-hang { }
+.Bl-hang > dt { }
+.Bl-hang > dd { margin-left: 5.5em; }
+.Bl-inset { }
+.Bl-inset > dt { }
+.Bl-inset > dd { margin-left: 0em; }
+.Bl-ohang { }
+.Bl-ohang > dt { }
+.Bl-ohang > dd { margin-left: 0em; }
+.Bl-tag { margin-top: 0.6em; margin-left: 5.5em; }
+.Bl-tag > dt {
+ float: left;
+ margin-top: 0em;
+ margin-left: -5.5em;
+ padding-right: 0.5em;
+ vertical-align: top;
+}
+.Bl-tag > dd {
+ clear: right;
+ column-count: 1; /* Force block formatting context. */
+ width: 100%;
+ margin-top: 0em;
+ margin-left: 0em;
+ margin-bottom: 0.6em;
+ vertical-align: top;
+}
+.Bl-compact { margin-top: 0em; }
+.Bl-compact > dd { margin-bottom: 0em; }
+.Bl-compact > dt { margin-top: 0em; }
+.Bl-column { }
+.Bl-column > tbody > tr { }
+.Bl-column > tbody > tr > td { margin-top: 1em; }
+.Bl-compact > tbody > tr > td { margin-top: 0em; }
+.Rs { font-style: normal; font-weight: normal; }
+.RsA { }
+.RsB { font-style: italic; font-weight: normal; }
+.RsC { }
+.RsD { }
+.RsI { font-style: italic; font-weight: normal; }
+.RsJ { font-style: italic; font-weight: normal; }
+.RsN { }
+.RsO { }
+.RsP { }
+.RsQ { }
+.RsR { }
+.RsT { text-decoration: underline; }
+.RsU { }
+.RsV { }
+
+.eqn { }
+.tbl td { vertical-align: middle; }
+.HP { margin-left: 3.8em; text-indent: -3.8em; }
diff --git a/stardis/consortium-en.html.in b/stardis/consortium-en.html.in
@@ -43,7 +43,7 @@ simply comes down to subscribing to this service offer.</p>
href=https://www.economie.gouv.fr/cedef/definition-petites-et-moyennes-entreprises>size
of the member</a> and the length of the subscription.</p>
-<table>
+<table class="list" style="width: 80%;">
<tr>
<th></th>
<th>1 year</th>
diff --git a/stardis/consortium-fr.html.in b/stardis/consortium-fr.html.in
@@ -44,7 +44,7 @@ se résume simplement à souscrire cette offre de service.</p>
href="https://www.economie.gouv.fr/cedef/definition-petites-et-moyennes-entreprises">taille
de l'adhérent</a> et de la durée d'engagement.</p>
-<table>
+<table class="list" style="width: 80%;">
<tr>
<th></th>
<th>1 an</th>