Convert script adds utf8 and jquery and makes a proper website!

This commit is contained in:
Ozbolt Menegatti 2018-10-30 15:18:40 +01:00
parent ce80142e99
commit 11f7d1ce2d

View File

@ -1,4 +1,13 @@
#!/bin/bash #!/bin/bash
cd $(dirname "$0") cd $(dirname "$0")
xsltproc -o out.html view.xsl examples/$1.xml
FILE="out.html"
FILE_TMP="tmp.html"
echo "<!DOCTYPE html><html><head><meta charset="utf-8" /><script src=\"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js\"></script></head><body>" > $FILE
xsltproc -o $FILE_TMP view.xsl examples/$1.xml
cat $FILE_TMP >> $FILE
echo "</body></html>" >> $FILE
rm $FILE_TMP