<commit_before>#!/bin/sh
# Copyright (c) 2009 The Open Source Geospatial Foundation.
# Copyright (c) 2009 LISAsoft
# Copyright (c) 2009 <NAME>
# Licensed under the GNU LGPL.
# 
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 2.1 of the License,
# or any later version.  This library 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 Lesser General Public License for more details, either
# in the "LICENSE.LGPL.txt" file distributed with this software or at
# web page "http://www.fsf.org/licenses/lgpl.html".

# About:
# =====
# This script will install documentation from 

# Running:
# =======
# sudo ./install_main_docs.sh


USER_NAME="user"
USER_HOME="/home/$USER_NAME"
SRC="../doc"
DEST="/usr/local/share/osgeolive-docs"
BASE_FILES="banner.png osgeolive.css images" # base files to install
HTML_FILES="contact.html index.html download.html sponsors.html"
INSTALL_APPS=../install_list # List applications to install 
APPS=`sed -e 's/#.*$//' "$INSTALL_APPS" | sort`
VERSION=`cat ../VERSION.txt`

apt-get --assume-yes install python-sphinx

mkdir -p $DEST/doc

# Copy style sheets and images
for ITEM in $BASE_FILES ; do
   # keep it at one file per line, as missing files tell us what is missing
   cp -prf ${SRC}/"$ITEM" "$DEST/"
done

# Copy pre.html into all the html files
for ITEM in ${HTML_FILES} ; do
  # copy the version number into the <h1>title</h1>
  cat ${SRC}/pre.html > $DEST/$ITEM
done

# Copy body of html static files
for ITEM in ${HTML_FILES}; do
  cat ${SRC}/${ITEM} >> $DEST/$ITEM
done

# Add contributors to the sponsors.html page
echo "<h1>OSGeo-Live contributors</h1>" >> ${DEST}/sponsors.html
echo "<p>Thank you to all the following people who have contributed to
the development of OSGeo-Live:</p>" >> ${DEST}/sponsors.html
echo "<table>" >> ${DEST}/sponsors.html
grep -v " *#" ${SRC}/../contributors.csv | cut -f1-3 -d, | \
  sed -e 's/^/<tr><td>/' -e 's/,/<\/td><td>/g' -e 's/$/<\/td><\/tr>/' \
      -e 's+<td>\(Name\|Email\|Country\)</td>+<td><u>\1</u></td>+g' \
      >> ${DEST}/sponsors.html
echo "</table>" >> ${DEST}/sponsors.html

# Add OSGeo Sponsors to sponsors page
  cat ${SRC}/sponsors_osgeo.html >> $DEST/sponsors.html

# Add version to all <h1> headers which contain OSGeo-Live
for ITEM in ${HTML_FILES}; do
  sed -e "s/\(<h1>.*\)\(OSGeo-Live\)/\1\2 ${VERSION}/" ${DEST}/${ITEM} > /tmp/${ITEM}
  mv /tmp/${ITEM} ${DEST}/${ITEM}
done


# Build the application overview pages
cd ../doc/overview/
make html
rm -fr ${DEST}/overview/
mv _build/html ${DEST}/overview/
rm ${DEST}/overview/genindex.html
# Replace the genindex (which doesn't populate) with overview.html
ln -s ${DEST}/overview/overview.html ${DEST}/overview/genindex.html
cd ../../bin

# Build the application quick start pages
cd ../doc/quickstart/
make html
rm -fr ${DEST}/quickstart/
rm ${DEST}/quickstart/genindex.html
ln -s ${DEST}/quickstart/quickstart.html ${DEST}/quickstart/genindex.html
mv _build/html ${DEST}/quickstart/
cd ../../bin

# Build the standard overview pages
cd ../doc/standards/
make html
rm -fr ${DEST}/standards/
mv _build/html ${DEST}/standards/
rm ${DEST}/standards/genindex.html
ln -s ${DEST}/standards/standards.html ${DEST}/standards/genindex.html
cd ../../bin

# license page start
#cp -f ${SRC}/license_pre.html "$DEST/license.html"

for ITEM in $APPS ; do
   # Publish Descriptions:

   # Convert .odt description to html if doc exists
   #if [ -e "${SRC}/descriptions/${ITEM}_description.odt" ] ; then
   #   abiword --to "${DEST}/doc/${ITEM}_description.html" "${SRC}/descriptions/${ITEM}_description.odt"<commit_msg>Add index.html files to quickstart, standards and overview doc directories<commit_after>#!/bin/sh
# Copyright (c) 2009 The Open Source Geospatial Foundation.
# Copyright (c) 2009 LISAsoft
# Copyright (c) 2009 <NAME>
# Licensed under the GNU LGPL.
# 
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 2.1 of the License,
# or any later version.  This library 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 Lesser General Public License for more details, either
# in the "LICENSE.LGPL.txt" file distributed with this software or at
# web page "http://www.fsf.org/licenses/lgpl.html".

# About:
# =====
# This script will install documentation from 

# Running:
# =======
# sudo ./install_main_docs.sh


USER_NAME="user"
USER_HOME="/home/$USER_NAME"
SRC="../doc"
DEST="/usr/local/share/osgeolive-docs"
BASE_FILES="banner.png osgeolive.css images" # base files to install
HTML_FILES="contact.html index.html download.html sponsors.html"
INSTALL_APPS=../install_list # List applications to install 
APPS=`sed -e 's/#.*$//' "$INSTALL_APPS" | sort`
VERSION=`cat ../VERSION.txt`

apt-get --assume-yes install python-sphinx

mkdir -p $DEST/doc

# Copy style sheets and images
for ITEM in $BASE_FILES ; do
   # keep it at one file per line, as missing files tell us what is missing
   cp -prf ${SRC}/"$ITEM" "$DEST/"
done

# Copy pre.html into all the html files
for ITEM in ${HTML_FILES} ; do
  # copy the version number into the <h1>title</h1>
  cat ${SRC}/pre.html > $DEST/$ITEM
done

# Copy body of html static files
for ITEM in ${HTML_FILES}; do
  cat ${SRC}/${ITEM} >> $DEST/$ITEM
done

# Add contributors to the sponsors.html page
echo "<h1>OSGeo-Live contributors</h1>" >> ${DEST}/sponsors.html
echo "<p>Thank you to all the following people who have contributed to
the development of OSGeo-Live:</p>" >> ${DEST}/sponsors.html
echo "<table>" >> ${DEST}/sponsors.html
grep -v " *#" ${SRC}/../contributors.csv | cut -f1-3 -d, | \
  sed -e 's/^/<tr><td>/' -e 's/,/<\/td><td>/g' -e 's/$/<\/td><\/tr>/' \
      -e 's+<td>\(Name\|Email\|Country\)</td>+<td><u>\1</u></td>+g' \
      >> ${DEST}/sponsors.html
echo "</table>" >> ${DEST}/sponsors.html

# Add OSGeo Sponsors to sponsors page
  cat ${SRC}/sponsors_osgeo.html >> $DEST/sponsors.html

# Add version to all <h1> headers which contain OSGeo-Live
for ITEM in ${HTML_FILES}; do
  sed -e "s/\(<h1>.*\)\(OSGeo-Live\)/\1\2 ${VERSION}/" ${DEST}/${ITEM} > /tmp/${ITEM}
  mv /tmp/${ITEM} ${DEST}/${ITEM}
done


# Build the application overview pages
cd ../doc/overview/
make html
rm -fr ${DEST}/overview/
mv _build/html ${DEST}/overview/
rm ${DEST}/overview/genindex.html
ln -s ${DEST}/overview/overview.html ${DEST}/overview/index.html
# Replace the genindex (which doesn't populate) with overview.html
ln -s ${DEST}/overview/overview.html ${DEST}/overview/genindex.html
cd ../../bin

# Build the application quick start pages
cd ../doc/quickstart/
make html
rm -fr ${DEST}/quickstart/
mv _build/html ${DEST}/quickstart/
rm ${DEST}/quickstart/genindex.html
ln -s ${DEST}/quickstart/quickstart.html ${DEST}/quickstart/index.html
ln -s ${DEST}/quickstart/quickstart.html ${DEST}/quickstart/genindex.html
mv _build/html ${DEST}/quickstart/
cd ../../bin

# Build the standard overview pages
cd ../doc/standards/
make html
rm -fr ${DEST}/standards/
mv _build/html ${DEST}/standards/
rm ${DEST}/standards/genindex.html
ln -s ${DEST}/standards/standards.html ${DEST}/standards/index.html
ln -s ${DEST}/standards/standards.html ${DEST}/standards/genindex.html
cd ../../bin

for ITEM in $APPS ; do
   # Publish Descriptions:

   # Convert .odt description to html if doc exists
   #if [ -e "${SRC}/descriptions/${ITEM}_description.odt" ] ; then
   #   abiword --to "${DEST}/doc/${ITEM}_description.html" "${SRC}/descriptions/${ITEM}_description.odt"
{'fraction_non_alphanumeric': 0.16190235264356184, 'fraction_numerical': 0.006324310650139135, 'mean_word_length': 3.8868974042027196, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 81, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7356958', 'n_tokens_mistral': 2776, 'n_tokens_neox': 2639, 'n_words': 848}