commit 3dfa1171f44957022445598fc7a37a37bdf943b5
parent 5631ef4a66970344eeb5aee82996ee4d196c0837
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 25 Oct 2017 15:26:06 +0200
Add the shiff script and HTML templates
Diffstat:
| M | Makefile | | | 12 | ++++++++++-- |
| M | meso.css | | | 47 | +++++++++++++++++++++++++++++++++++++---------- |
| A | schiff.html | | | 157 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | schiff.html.in | | | 122 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | schiff.sh | | | 136 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| M | solstice-menu.sh | | | 146 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------- |
| M | solstice.html.in | | | 2 | +- |
| M | solstice.sh | | | 16 | ++++++++-------- |
8 files changed, 575 insertions(+), 63 deletions(-)
diff --git a/Makefile b/Makefile
@@ -17,13 +17,16 @@ SOLSTICE-VERSION=0.6.1
SOLSTICE-ABG=~/mesdocs/meso-star/solstice-docs/Solstice-ABG/
SOLSTICE-PP=~/code/meso-star/solstice-scripts/
+SCHIFF-VERSION=0.3.0
+SCHIFF-SCRIPTS=~/code/meso-star/schiff-scripts/src/
+
REMOTE=OVH:www/solstice/
.PHONY: default
default: all
.PHONY: all
-all: solstice
+all: solstice schiff
.PHONY: solstice
solstice:
@@ -41,7 +44,7 @@ clean:
downloads/Solstice-ABG.pdf \
downloads/Solstice-ABG-rsrc.zip \
downloads/Solstice-PP-Sources.tar.gz \
- downloads/Solstice-PP-Sources.tar.gz.sig
+ downloads/Solstice-PP-Sources.tar.gz.sig
.PHONY: publish
publish:
@@ -58,3 +61,8 @@ publish:
downloads/*.sig \
$(REMOTE)/downloads/
rsync -avzr man $(REMOTE)
+
+.PHONY: schiff
+schiff: schiff.html.in
+ @sh schiff.sh $(SCHIFF-VERSION) $(SCHIFF-SCRIPTS)
+
diff --git a/meso.css b/meso.css
@@ -104,7 +104,30 @@ pre.code a {
margin-left: 56em;
}
-#menu ul {
+#menu h2 {
+ font-variant: small-caps;
+ border-bottom: none;
+ padding-top: 0;
+ margin: 0.5em 0 0.5em 0;
+}
+
+#menu h2#cur {
+ /* Nothing */
+}
+
+#menu a {
+ text-decoration: none;
+ color: #AAAAAA;
+}
+
+#menu a:hover {
+ color: #777777;
+}
+
+/*******************************************************************************
+ * Sub-menu
+ ******************************************************************************/
+#sub-menu ul {
list-style-type: none;
font-weight: bold;
padding: 0 0 0 0;
@@ -112,36 +135,40 @@ pre.code a {
font-size: 11pt;
}
-#menu li {
+#sub-menu li {
padding: 0.2em 0 0.2em 0;
}
-#menu ul#lvl2 {
+#sub-menu ul#lvl2 {
padding: 0 0 0 2em;
font-weight: normal;
font-size: 10pt;
}
-#menu ul#lvl2 a {
+#sub-menu ul#lvl2 a {
font-weight: normal;
}
-#menu li#cur {
+#sub-menu li#cur {
color: #f44d27
}
-#menu a {
+#sub-menu a {
text-decoration: none;
color: #000000;
}
-
-#menu a:hover {
+#sub-menu a:hover {
color: #777777;
}
-#menu h2 {
- font-variant: small-caps;
+#sub-menu h2 {
+ color: #000000;
+}
+
+#sub-menu {
+ border-top: 1px solid #aaaaaa;
+ border-bottom: 1px solid #aaaaaa;
}
/*******************************************************************************
diff --git a/schiff.html b/schiff.html
@@ -0,0 +1,157 @@
+<!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>Solstice</title>
+ <link rel="stylesheet" title="default" href="meso.css">
+</head>
+
+<body>
+<div id="menu">
+ <h2 id=cur>Schiff</h2>
+ <div id=sub-menu>
+ <ul>
+ <li id=cur>About</li>
+ <li>Reference documentation</li>
+ </ul>
+ <ul id=lvl2>
+ <li><a href="man/man1/schiff.1.html">schiff</a></li>
+ <li><a href="man/man5/schiff-geometry.5.html">schiff-geometry</a></li>
+ <li><a href="man/man5/schiff-output.5.html">schiff-output</a></li>
+ </ul>
+ <div id="info">
+ <p>Schiff is developped by <a
+ href="https://www.meso-star.com">|Méso|Star></a> for the
+ National Center for Scientific Research. It is copyright ©
+ <a href="http://www.cnrs.fr/index.php">CNRS</a> 2016-2017.</p>
+ </div>
+ </div>
+ <h2><a href=solstice.html>Solstice</a></h2>
+</div>
+<div id=content>
+<header>
+ <h1>Schiff - Radiative properties of soft particles</h1>
+</header>
+
+<div id="news">
+ <p><b>Download Schiff 0.3.0</b></p>
+ <ul>
+ <li>GNU/Linux:
+ <a href="downloads/Schiff-0.3.0-GNU-Linux64.tar.gz">tarball</a> /
+ <a href="downloads/Schiff-0.3.0-GNU-Linux64.tar.gz.sig">pgp</a></li>
+ <li>Sources:
+ <a href="downloads/Schiff-0.3.0-Source.tar.gz">tarball</a> /
+ <a href="downloads/Schiff-0.3.0-Source.tar.gz.sig">pgp</a></li>
+ </ul>
+</div>
+
+<p>The Schiff program computes the <b>radiative properties</b> of soft
+particles. It uses the <b>Monte-Carlo</b> method to solve Maxwell's equations
+within the (<a
+href="https://journals.aps.org/pr/abstract/10.1103/PhysRev.104.1481">L Schiff's
+approximation</a> as presented in <a
+href="http://www.sciencedirect.com/science/article/pii/S0022407315003283">Charon
+et al. 2015</a>.The main advantages of using Monte-Carlo are: the possibility
+to address <b>any shape</b> of particle, and the results are provided with a
+<b>numerical accuracy</b>.</p>
+
+<p>For a mixture of soft particles, Schiff estimates the total
+<b>cross-sections</b> (absorption, scattering and extinction cross-sections) in
+addition of the <b>phase function</b>, its cumulative and its inverse
+cumulative.</p>
+
+<p>The set of particles to simulate is defined by its <b>refractive index</b> -
+provided at various wavelengths - and a <b>geometry distribution</b> that
+controls how the particles look like into the mixture. More precisely, this
+distribution describes the main shapes of the particles (sphere, cylinder,
+helical pipe, <i>etc.</i>) and their statistical variation according to the
+distribution of their parameters (gaussian, lognormal, <i>etc.</i>).</p>
+
+<p>Schiff is available on GNU/Linux 64-bits. It is a free software release
+under the GPLv3+ license. 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>
+
+<h2>A straight interface</h2>
+
+<p>The Schiff program is a <b>command-line tool</b> that processes input data,
+performs computations, write results and that's all. It makes no assumptions on
+how the input data are created excepted that it has to follow the expected file
+formats. The simulation results are also provided as is, in a raw ASCII
+file.</p>
+
+<p>This thin interface is particularly
+well suited to be <b>extended</b> and <b>integrated into any toolchain</b>.
+According to the user needs, the optical properties of the particles can be
+entered manually or generated by an external program. In the same way, the
+output data can either directly interpreted or post-processed by any script
+with respect to the targeted toolchain.</p>
+
+<h2>Quick start</h2>
+
+<p>Download the desired archive of Schiff and verify its integrity against its
+<a href=pgp.html>PGP signature</a>. Then extract it. Finally source the
+provided <code>schiff.profile</code> file to register the Schiff installation
+for the current shell priorly to the invocation of the <code>schiff</code>
+program.</p>
+
+
+<pre class="code">
+$ source ~/Schiff-0.3.0-GNU-Linux64/etc/schiff.profile
+$ solstice -h
+</pre>
+
+<p>The Solstice <b>reference documentation</b> is provided trough man pages.
+Simply use the <code>man</code> command-line to consult it.</p>
+
+<pre class="code">
+$ man schiff
+$ man schiff-geometry
+$ man schiff-output
+</pre>
+
+<h2>Post-Process</h2>
+
+<p>The following Bash script illustrates how to post-process the Schiff
+results. It is an example, provided as is, without additional support. You can
+study, modify, extend or redistribute it freely, according to your needs.</p>
+
+<table>
+ <tr><th>Pretty results</th></tr>
+ <tr><td>[<a href='downloads/schiff_pretty_results.sh'>Bash script</a>]</td></tr>
+</table>
+
+<p>This script reads an output file generated by the <code>schiff</code>
+command line and split its raw ASCII results in several human readable text
+files in order to simplify their analysis.</p>
+
+<pre class="code">
+$ schiff -i geom-distrib.yaml -l 2.3 -w0.5:0.6 -o output properties
+$ bash ./schiff_pretty_results.sh output
+Write xsections.txt
+Write descs.txt
+Write func_0.5.txt
+Write func_0.6.txt
+Write cumul_0.5.txt
+Write cumul_0.6.txt
+Write invcumul_0.5.txt
+Write invcumul_0.6.txt
+</pre>
+
+The first generated files, named
+<code>xsections.txt</code>, lists for each wavelength submitted with the
+<code>-w</code> option, its associated absorption, extinction and scattering
+cross sections. The second file, <code>descs.txt</code>, gives overall
+informations for each simulated wavelengths, like the limit scattering angles
+from which its phase function was analytically computed. Then for each
+wavelengths, the script generates 3 files named
+<code>func_<WLEN>.txt</code>,
+<code>cumul_<WLEN>.txt</code>, and
+<code>invcumul_<WLEN>.txt</code> that store for the wavelength
+<code><WLEN></code>, the value of its associated phase function as
+well as its cumulative and its inverse cumulative, respectively.</p>
+
+</div>
+</body>
diff --git a/schiff.html.in b/schiff.html.in
@@ -0,0 +1,122 @@
+<header>
+ <h1>Schiff - Radiative properties of soft particles</h1>
+</header>
+
+<div id="news">
+ <p><b>Download Schiff ${VERSION}</b></p>
+ <ul>
+ <li>GNU/Linux:
+ <a href="downloads/Schiff-${VERSION}-GNU-Linux64.tar.gz">tarball</a> /
+ <a href="downloads/Schiff-${VERSION}-GNU-Linux64.tar.gz.sig">pgp</a></li>
+ <li>Sources:
+ <a href="downloads/Schiff-${VERSION}-Source.tar.gz">tarball</a> /
+ <a href="downloads/Schiff-${VERSION}-Source.tar.gz.sig">pgp</a></li>
+ </ul>
+</div>
+
+<p>The Schiff program computes the <b>radiative properties</b> of soft
+particles. It uses the <b>Monte-Carlo</b> method to solve Maxwell's equations
+within the (<a
+href="https://journals.aps.org/pr/abstract/10.1103/PhysRev.104.1481">L Schiff's
+approximation</a> as presented in <a
+href="http://www.sciencedirect.com/science/article/pii/S0022407315003283">Charon
+et al. 2015</a>.The main advantages of using Monte-Carlo are: the possibility
+to address <b>any shape</b> of particle, and the results are provided with a
+<b>numerical accuracy</b>.</p>
+
+<p>For a mixture of soft particles, Schiff estimates the total
+<b>cross-sections</b> (absorption, scattering and extinction cross-sections) in
+addition of the <b>phase function</b>, its cumulative and its inverse
+cumulative.</p>
+
+<p>The set of particles to simulate is defined by its <b>refractive index</b> -
+provided at various wavelengths - and a <b>geometry distribution</b> that
+controls how the particles look like into the mixture. More precisely, this
+distribution describes the main shapes of the particles (sphere, cylinder,
+helical pipe, <i>etc.</i>) and their statistical variation according to the
+distribution of their parameters (gaussian, lognormal, <i>etc.</i>).</p>
+
+<p>Schiff is available on GNU/Linux 64-bits. It is a free software release
+under the GPLv3+ license. 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>
+
+<h2>A straight interface</h2>
+
+<p>The Schiff program is a <b>command-line tool</b> that processes input data,
+performs computations, write results and that's all. It makes no assumptions on
+how the input data are created excepted that it has to follow the expected file
+formats. The simulation results are also provided as is, in a raw ASCII
+file.</p>
+
+<p>This thin interface is particularly
+well suited to be <b>extended</b> and <b>integrated into any toolchain</b>.
+According to the user needs, the optical properties of the particles can be
+entered manually or generated by an external program. In the same way, the
+output data can either directly interpreted or post-processed by any script
+with respect to the targeted toolchain.</p>
+
+<h2>Quick start</h2>
+
+<p>Download the desired archive of Schiff and verify its integrity against its
+<a href=pgp.html>PGP signature</a>. Then extract it. Finally source the
+provided <code>schiff.profile</code> file to register the Schiff installation
+for the current shell priorly to the invocation of the <code>schiff</code>
+program.</p>
+
+
+<pre class="code">
+$ source ~/Schiff-${VERSION}-GNU-Linux64/etc/schiff.profile
+$ solstice -h
+</pre>
+
+<p>The Solstice <b>reference documentation</b> is provided trough man pages.
+Simply use the <code>man</code> command-line to consult it.</p>
+
+<pre class="code">
+$ man schiff
+$ man schiff-geometry
+$ man schiff-output
+</pre>
+
+<h2>Post-Process</h2>
+
+<p>The following Bash script illustrates how to post-process the Schiff
+results. It is an example, provided as is, without additional support. You can
+study, modify, extend or redistribute it freely, according to your needs.</p>
+
+<table>
+ <tr><th>Pretty results</th></tr>
+ <tr><td>[<a href='downloads/schiff_pretty_results.sh'>Bash script</a>]</td></tr>
+</table>
+
+<p>This script reads an output file generated by the <code>schiff</code>
+command line and split its raw ASCII results in several human readable text
+files in order to simplify their analysis.</p>
+
+<pre class="code">
+$ schiff -i geom-distrib.yaml -l 2.3 -w0.5:0.6 -o output properties
+$ bash ./schiff_pretty_results.sh output
+Write xsections.txt
+Write descs.txt
+Write func_0.5.txt
+Write func_0.6.txt
+Write cumul_0.5.txt
+Write cumul_0.6.txt
+Write invcumul_0.5.txt
+Write invcumul_0.6.txt
+</pre>
+
+The first generated files, named
+<code>xsections.txt</code>, lists for each wavelength submitted with the
+<code>-w</code> option, its associated absorption, extinction and scattering
+cross sections. The second file, <code>descs.txt</code>, gives overall
+informations for each simulated wavelengths, like the limit scattering angles
+from which its phase function was analytically computed. Then for each
+wavelengths, the script generates 3 files named
+<code>func_<WLEN>.txt</code>,
+<code>cumul_<WLEN>.txt</code>, and
+<code>invcumul_<WLEN>.txt</code> that store for the wavelength
+<code><WLEN></code>, the value of its associated phase function as
+well as its cumulative and its inverse cumulative, respectively.</p>
+
diff --git a/schiff.sh b/schiff.sh
@@ -0,0 +1,136 @@
+#!/bin/bash
+
+# Copyright (C) |Meso|Star> 2017
+#
+# 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 ./solstice-menu.sh
+
+if [ $# -lt 2 ]; then
+ echo "Usage: $0 VERSION SCRIPTS-PATH"
+ exit 1
+fi
+
+if [ ! -f "$2/schiff_pretty_results.sh" ]; then
+ echo "Cannot found $2/schiff_pretty_results.sh script."
+ exit 1
+fi
+
+if [ ! -f "./downloads/Schiff-$1-GNU-Linux64.tar.gz" ]; then
+ echo "Cannot find ./downloads/Schiff-$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 ">>> Schiff packages"; tput sgr0
+archs=$(find downloads -regex "^.*/Schiff-[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 ""
+
+################################################################################
+# Copy the post-process script
+################################################################################
+tput bold; echo ">>> Schiff Post-Processes"; tput sgr0
+echo "RSync $2/schiff_pretty_results.sh"
+rsync $2/schiff_pretty_results.sh ./downloads/
+echo ""
+
+################################################################################
+# Generate the About page
+################################################################################
+tput bold; echo ">>> Schiff web pages"; tput sgr0
+echo "Write schiff.html"
+{
+ print_header Schiff About
+ VERSION=$1 envsubst < schiff.html.in;
+ print_footer
+} > schiff.html
+
+################################################################################
+# Generate the reference documentation
+################################################################################
+cd $dir_temp
+arch=Schiff-$1-GNU-Linux64
+cp $dir_curr/downloads/$arch.tar.gz .
+tar xzf $arch.tar.gz
+cd $dir_curr
+
+for((i=0; i<${#schiff_man_pages[@]}; ++i)); do
+ entry=(${schiff_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
+
+ 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 '/\ /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
+
+done
+
diff --git a/solstice-menu.sh b/solstice-menu.sh
@@ -15,16 +15,107 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-man_pages=(
+solstice_man_pages=(
"solstice 1"
"solstice-input 5"
"solstice-output 5"
"solstice-receiver 5"
)
+schiff_man_pages=(
+ "schiff 1"
+ "schiff-geometry 5"
+ "schiff-output 5"
+)
+
+print_schiff_sub_menu() {
+ local root=$1
+ local name=$2
+
+ echo ' <div id=sub-menu>'
+ echo ' <ul>'
+ if [ "$name" == "About" ]; then
+ echo ' <li id=cur>About</li>'
+ else
+ echo " <li><a href=${root}schiff.html>About</a></li>"
+ fi
+ echo ' <li>Reference documentation</li>'
+ echo ' </ul>'
+ echo ' <ul id=lvl2>'
+ local i
+ for((i=0; i < ${#schiff_man_pages[@]}; ++i)); do
+ local entry=(${schiff_man_pages[$i]})
+ if [ "$name" == "${entry[0]}" ]; then
+ echo " <li id=cur>$name</li>"
+ else
+ local link_path="${root}man/man${entry[1]}/${entry[0]}.${entry[1]}.html"
+ echo " <li><a href=\"$link_path\">${entry[0]}</a></li>"
+ fi
+ done
+ echo ' </ul>'
+ echo ' <div id="info">'
+ echo ' <p>Schiff is developped by <a'
+ echo ' href="https://www.meso-star.com">|Méso|Star></a> for the'
+ echo ' National Center for Scientific Research. It is copyright ©'
+ echo ' <a href="http://www.cnrs.fr/index.php">CNRS</a> 2016-2017.</p>'
+ echo ' </div>'
+ echo ' </div>'
+}
+
+print_solstice_sub_menu() {
+ local root=$1
+ local name=$2
+
+ echo ' <div id=sub-menu>'
+ echo ' <ul>'
+ if [ "$name" == "About" ]; then
+ echo ' <li id=cur>About</li>'
+ else
+ echo " <li><a href=${root}solstice.html>About</a></li>"
+ fi
+ echo ' <li>Reference documentation</li>'
+ echo ' </ul>'
+ echo ' <ul id=lvl2>'
+ local i
+ for((i=0; i < ${#solstice_man_pages[@]}; ++i)); do
+ local entry=(${solstice_man_pages[$i]})
+ if [ "$name" == "${entry[0]}" ]; then
+ echo " <li id=cur>$name</li>"
+ else
+ local link_path="${root}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>'
+ if [ "$name" == "Downloads" ]; then
+ echo ' <li id=cur>Downloads</li>'
+ else
+ echo " <li><a href=${root}solstice-downloads.html>Downloads</a></li>"
+ fi
+ if [ "$name" == "Resources" ]; then
+ echo ' <li id=cur>Additional resources</li>'
+ else
+ echo " <li><a href=${root}solstice-resources.html>Additional resources</a></li>"
+ fi
+ echo " <li><a href=https://gitlab.com/meso-star/solstice>Source code repository</a></li>"
+ echo ' </ul>'
+ echo ' <div id="info">'
+ echo ' <p>Solstice is developped by <a'
+ echo ' href="https://www.meso-star.com">|Méso|Star></a> in collaboration with'
+ echo ' the <a href="http://www.labex-solstice.fr/">Laboratory of Excellence'
+ echo ' Solstice</a> and the <a'
+ echo ' href="http://www.promes.cnrs.fr/index.php?page=home-en">PROMES</a>'
+ echo ' laboratory of the National Center for Scientific Research. It is copyright'
+ echo ' © <a href="http://www.cnrs.fr/index.php">CNRS</a> 2016-2017.</p>'
+ echo ' </div>'
+ echo ' </div>'
+}
+
print_header() {
- local name=${1#man-}
- local root=$([[ "$1" != "$name" ]] && echo "../../" || echo "")
+ local section=$1
+ local name=${2#man-}
+ local root=$([[ "$2" != "$name" ]] && echo "../../" || echo "")
echo '<!DOCTYPE html>'
echo ''
@@ -38,53 +129,24 @@ print_header() {
echo ''
echo '<body>'
echo '<div id="menu">'
- echo ' <h2>Solstice</h2>'
- echo ' <ul>'
- if [ "$name" == "About" ]; then
- echo ' <li id=cur>About</li>'
- else
- echo " <li><a href=${root}solstice.html>About</a></li>"
- fi
- echo ' <li>Reference documentation</li>'
- echo ' </ul>'
- echo ' <ul id=lvl2>'
- local i
- for((i=0; i < ${#man_pages[@]}; ++i)); do
- local entry=(${man_pages[$i]})
- if [ "$1" == "man-${entry[0]}" ]; then
- echo " <li id=cur>$name</li>"
- else
- local link_path="${root}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>'
- if [ "$name" == "Downloads" ]; then
- echo ' <li id=cur>Downloads</li>'
+ if [ "$section" == "Schiff" ]; then
+ echo ' <h2 id=cur>Schiff</h2>'
+ print_schiff_sub_menu "$root" "$name"
else
- echo " <li><a href=${root}solstice-downloads.html>Downloads</a></li>"
+ echo " <h2><a href=${root}schiff.html>Schiff</a></h2>"
fi
- if [ "$name" == "Resources" ]; then
- echo ' <li id=cur>Additional resources</li>'
+ if [ "$section" == "Solstice" ]; then
+ echo ' <h2 id=cur>Solstice</h2>'
+ print_solstice_sub_menu "$root" "$name"
else
- echo " <li><a href=${root}solstice-resources.html>Additional resources</a></li>"
+ echo " <h2><a href=${root}solstice.html>Solstice</a></h2>"
fi
- echo " <li><a href=https://gitlab.com/meso-star/solstice>Source code repository</a></li>"
- echo ' </ul>'
- echo ' <div id="info">'
- echo ' <p>Solstice is developped by <a'
- echo ' href="https://www.meso-star.com">|Méso|Star></a> in collaboration with'
- echo ' the <a href="http://www.labex-solstice.fr/">Laboratory of Excellence'
- echo ' Solstice</a> and the <a'
- echo ' href="http://www.promes.cnrs.fr/index.php?page=home-en">PROMES</a>'
- echo ' laboratory of the National Center for Scientific Research. It is copyright'
- echo ' © <a href="http://www.cnrs.fr/index.php">CNRS</a> 2016-2017.</p>'
- echo ' </div>'
+
echo '</div>'
echo '<div id=content>'
}
+
print_footer() {
echo '</div>' # content
echo '</body>'
diff --git a/solstice.html.in b/solstice.html.in
@@ -6,7 +6,7 @@
<p><b>Solstice ${VERSION} is available</b></p>
<ul>
<li>GNU/Linux:
- <a href="downloads/Solstice-${VERSION}-GNU-Linux64.tar.gz">tar.gz</a> /
+ <a href="downloads/Solstice-${VERSION}-GNU-Linux64.tar.gz">tarball</a> /
<a href="downloads/Solstice-${VERSION}-GNU-Linux64.tar.gz.sig">pgp</a></li>
<li>Windows:
<a href="downloads/Solstice-${VERSION}-Win64.zip">zip</a> /
diff --git a/solstice.sh b/solstice.sh
@@ -19,13 +19,11 @@ set -e
source ./solstice-menu.sh
-
if [ $# -lt 3 ]; then
echo "Usage: $0 VERSION ABG-PATH PP-PATH"
exit 1
fi
-
if [ ! -f "./downloads/Solstice-$1-GNU-Linux64.tar.gz" ]; then
echo "Cannot find Solstice-$1-GNU-Linux64.tar.gz"
exit 1
@@ -177,7 +175,7 @@ cd $dir_curr
################################################################################
echo "Write solstice.html"
{
- print_header About;
+ print_header Solstice About;
VERSION=$1 envsubst < solstice.html.in;
print_footer;
} > solstice.html
@@ -187,7 +185,7 @@ echo "Write solstice.html"
################################################################################
echo "Write solstice-downloads.html"
{
- print_header Downloads;
+ print_header Solstice Downloads;
echo '<header><h1>Downloads</h1></header>';
print_downloads;
VERSION=$1 envsubst < pgp_signature.html.in;
@@ -200,7 +198,7 @@ echo "Write solstice-downloads.html"
################################################################################
echo "Write solstice-resources.html"
{
- print_header Resources;
+ print_header Solstice Resources;
cat solstice-resources.html.in;
print_footer;
} > solstice-resources.html
@@ -208,8 +206,8 @@ echo "Write solstice-resources.html"
################################################################################
# Generate the reference documentation
################################################################################
-for((i=0; i<${#man_pages[@]}; ++i)); do
- entry=(${man_pages[$i]})
+for((i=0; i<${#solstice_man_pages[@]}; ++i)); do
+ entry=(${solstice_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
@@ -230,7 +228,7 @@ for((i=0; i<${#man_pages[@]}; ++i)); do
echo "Write $output"
{
- print_header man-${entry[0]}
+ 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>";
@@ -260,3 +258,5 @@ for((i=0; i<${#man_pages[@]}; ++i)); do
print_footer >> $output
done
+echo ""
+