This commit is contained in:
Bachir Soussi Chiadmi
2016-12-04 16:39:42 +01:00
parent a81d97708c
commit b36ca5bcc0
4 changed files with 21 additions and 15 deletions
+11 -4
View File
@@ -4,6 +4,7 @@
echo "generating complete file"
echo "creating folders"
if [ ! -d ../output/images ]; then
mkdir ../output/images
fi
@@ -23,6 +24,7 @@ touch content.textile
echo "" > /tmp/summary
echo "reading content"
# _ _
# | | | |
# ___ ___ _ __ | |_ ___ _ __ | |_
@@ -32,12 +34,13 @@ echo "" > /tmp/summary
echo "<section id='main'>" >> content.textile
for i in ../content/*; do
# if folder if not sys if not modele
if [ -d "$i" ] && [ "$i" != "../model" ]; then
if [ -d "$i" ] && [[ ! "$i" =~ "model" ]]; then
# if readme exists
if [ -f "$i/readme.textile" ]; then
# user name
# record readme content on variable
cont=$(cat "$i/readme.textile")
echo " $i"
# echo "$cont"
# user=$(grep "h1\.\s*.+" "$i/readme.textile")
@@ -69,6 +72,7 @@ for i in ../content/*; do
# |_|_| |_| |_|\__,_|\__, |\___||___/
# __/ |
# |___/
echo " images"
images=""
l=0
echo "<section class='images'>"$'\n' >> content.textile
@@ -109,6 +113,7 @@ for i in ../content/*; do
# (__ ) /_/ / /_/ / / / /__/ __(__ )
# /____/\____/\__,_/_/ \___/\___/____/
#
echo " sources"
echo "<section class='sources'>"$'\n' >> content.textile
for src in $i/sources/*; do
# echo "patch : $src"
@@ -141,6 +146,7 @@ echo "</section>" >> content.textile
# | '_ \ / _ \/ _` |/ _` |/ _ \ '__|
# | | | | __/ (_| | (_| | __/ |
# |_| |_|\___|\__,_|\__,_|\___|_|
echo "header"
touch /tmp/header
echo "<header id='header'>"$'\n' > /tmp/header
echo "h1. OLA#3 Documentation"$'\n' >> /tmp/header
@@ -151,16 +157,17 @@ echo "</header>" >> /tmp/header
cat /tmp/header|cat - content.textile > /tmp/out && mv /tmp/out content.textile
echo "Pandoc"
pandoc -s \
-f textile \
-t html5 -o ../output/index.html \
-H css/lightbox.min.css \
-H css/main.css \
-H style.tpl.html \
-A script.tpl.html \
content.textile
# -H css/main.css \
cp -r css ../output/
cp -r fonts ../output/
cp -r bower_components ../output/