1
0
Fork 0
Browse Source

Output information added

master
Rogier Neeleman 10 years ago
parent
commit
012e53cbb4
  1. 21
      genereer

21
genereer

@ -11,6 +11,7 @@ SERVERS='314.sciuro.org chip.sciuro.org skippy.sciuro.org slappy.sciuro.org irc. @@ -11,6 +11,7 @@ SERVERS='314.sciuro.org chip.sciuro.org skippy.sciuro.org slappy.sciuro.org irc.
mkdir -p $SITE
# Root pagina's
echo -n "Generating root pages"
rm -rf $SITE/*.html
for i in `ls *.txt`; do
FILENAME=`echo $i |cut -d\. -f1`
@ -18,8 +19,10 @@ for i in `ls *.txt`; do @@ -18,8 +19,10 @@ for i in `ls *.txt`; do
cat $i >> $SITE/$FILENAME.html
cat $LAYOUT/footer.html >> $SITE/$FILENAME.html
done
echo " [Ok]"
# Server directory
echo -n "Generating server pages"
mkdir -p $SITE/servers/
rm -rf $SITE/servers/*.html
@ -46,8 +49,10 @@ for i in $SERVERS; do @@ -46,8 +49,10 @@ for i in $SERVERS; do
echo "</center>" >> $SITE/$FILENAME.html
cat $LAYOUT/footer.html >> $SITE/$FILENAME.html
done
echo " [Ok]"
# Howto directory
echo -n "Generating howto pages"
mkdir -p $SITE/howto/
rm -rf $SITE/howto/*.html
@ -74,8 +79,10 @@ for i in `ls howto/*.txt`; do @@ -74,8 +79,10 @@ for i in `ls howto/*.txt`; do
echo "Last modification: $MODTIME" >> $SITE/$FILENAME.html
cat $LAYOUT/footer.html >> $SITE/$FILENAME.html
done
echo " [Ok]"
# Blog pages
echo -n "Generating blog pages"
mkdir -p $SITE/blog/
rm -rf $SITE/blog/*.html
@ -108,8 +115,10 @@ for i in `ls blog/*.txt`; do @@ -108,8 +115,10 @@ for i in `ls blog/*.txt`; do
echo "<a href='mailto:react@sciuro.org?SUBJECT=$BLOGID'>React to blog</a>" >> $SITE/$FILENAME.html
cat $LAYOUT/footer.html >> $SITE/$FILENAME.html
done
echo " [Ok]"
# Photo pages
echo -n "Generating Photo pages"
mkdir -p $SITE/photo/
rm -rf $SITE/photo/*.html
@ -128,6 +137,7 @@ for i in `ls -r photo/*.txt`; do @@ -128,6 +137,7 @@ for i in `ls -r photo/*.txt`; do
echo "-<a href='__SITEURL__/$FILENAME.html'>$PTITLE</a>" >> $SITE/photo/index.html
done
cat $LAYOUT/footer.html >> $SITE/photo/index.html
echo " [Ok]"
for i in `ls photo/*.txt`; do
FILENAME=`echo $i |cut -d\. -f1`
@ -135,6 +145,7 @@ for i in `ls photo/*.txt`; do @@ -135,6 +145,7 @@ for i in `ls photo/*.txt`; do
BDATE=`date -d$BFILEDATE +%A\ %B\ %e\ %Y`
BLOGID=`echo $FILENAME |cut -d\/ -f2`
DIRNAME=`echo $FILENAME |cut -d\/ -f2`
echo -n "Processing photo album $DIRNAME "
mkdir -p $SITE/$FILENAME/normal/
mkdir -p $SITE/$FILENAME/thumbs/
@ -186,24 +197,34 @@ for i in `ls photo/*.txt`; do @@ -186,24 +197,34 @@ for i in `ls photo/*.txt`; do
echo "<center><img src='__SITEURL__/photo/$DIRNAME/normal/$IMAGENAME' width=480px></center>" >> $SITE/photo/$DIRNAME/$NAME.html
cat $LAYOUT/footer.html >> $SITE/photo/$DIRNAME/$NAME.html
echo -n "*"
done
echo "</table></center>" >> $SITE/$FILENAME.html
cat $LAYOUT/footer.html >> $SITE/$FILENAME.html
echo " [Ok]"
done
# Other directories
echo -n "Process extra directories"
for i in $EXTRA; do
rm -rf $SITE/$i
cp -a $i $SITE/$i
done
echo " [Ok]"
# Replace variables
echo -n "Replace variables"
for i in `find $SITE/ -name *.html`; do
sed -i 's/__SITEURL__/\/newsite/g' $i
done
echo " [Ok]"
# Publish
echo -n "Publish website"
rsync --delete --recursive $SITE/* 314:/usr/share/mini-httpd/html/newsite/
echo " [Ok]"

Loading…
Cancel
Save