TrainingCourses/PlasmaSchools/ASPNF.th/18/script.bash

#!/bin/bash

file=index.html
width=33
rm $file



dirs=("kickoff" "remotecontrol" "golem" "tutors" "whiteboards" "reporting" "presentations")
names=("Kick off" "In action" "The tokamak GOLEM" "Tutors" "Whiteboards after the activity" "Preparing reports" "Mini conference")
comments=("Tutor Remy Guirlet (CEA Cadarache) introducing remote operation" "Students requesting discharges via tokamak GOLEM remote control web based interface (see their laptops) under supervision of their tutors" "north and south side" "Essential contribution" "Really hard work" ".. up to the night." "Students presenting their achievements")

function ImagePart()
{
let counter=$1
echo "<h2>${names[$counter]}</h2>${comments[$counter]}<br></br>" >> $file; \
  for i in ${dirs[$counter]}/*.jpg; do echo "<a href="${dirs[$counter]}/`basename $i .jpg`.jpg"><img src='${dirs[$counter]}/`basename $i .jpg`.jpg' width='33%'/></a>">> $file; done
}

echo "\
<html><head>
<style>
body {background-color: powderblue;font:25px 'Arial CE', 'Helvetica CE', Arial, sans-serif;}
h1   {color: darkred;font-weight: bold;}
h2   {color: indianred;}
a   {color: MidnightBlue;}
p    {color: red;}
</style>
<body><center>\
<h1>The GOLEM tokamak remote operation for<br></br> the <a href="https://sites.google.com/site/fusionschoolth/aspnf2018">Fusion School Thailand - ASPNF 2018<br></br><img src="ASEAN.jpg" width="$width%"></a></h1>\
<img src="map.jpg" width="$width%"></img><br></br>An example of the real remote tokamak operation education event with the following set-up:<br></br>
* Experimental device <a href="http://golem.fjfi.cvut.cz/">tokamak GOLEM</a> at Prague, Czech republic. Responsible operator: Vojtech Svoboda<br/>
* Education event at <a href="https://www.cmu.ac.th/en/">Chiang Mai University</a>, Thailand. 6 groups of students.<br/>
* Tutors from <a href="http://www.cea.fr/english">CEA - Cadarache</a>, France: (Remy Guirlet, Thierry Loarer, Bernard Pegourie, Remi Dumont, Julien Hillairet )<br/>
</br>
<h2>The program of the ASEAN school</h2> <a href="aspnf2018-program-27sep2017b.pdf"><img src="ASEANprogram.jpg" width="50%"></a>

<h2><a href="Hands-on presentation GOLEM ASPNF - complete.pdf">Hands on project: experiment on GOLEM - methodical material</h2> " >> $file

for i in `seq 0 8`; do echo "<a href="Hands-on.pdf"><img src="HandsOnPres-$i.jpg" width="10%"></img></a>" >> $file; done

echo "\
<h2>Introductory lecture (made remotely via skype by Vojtech Svoboda)</h2>Students were acquainted with the <a href="presentation/present.pdf">problematic of the tokamak (GOLEM) technology, diagnostics and operation</a> ..<br></br>" >> $file

for i in `seq 0 68`; do echo "<a href="presentation/present.pdf"><img src="presentation/present"$i"_thb.png" width="10%"></img></a>" >> $file; done


#<a href="presentation/present.pdf"><img src="presentation/present_thb2.png" width="$width%"></img></a>
#<a href="presentation/present.pdf"><img src="presentation/present_thb5.png" width="$width%"></img></a>
#<a href="presentation/present.pdf"><img src="presentation/present_thb15.png" width="$width%"></img></a>




#counter=0
#for j in $dirs; do echo $j; echo "<h2>${names[$counter]}</h2>${comments[$counter]}<br></br>" >> $file; \
#  for i in $j/*.jpg; do echo "<a href="$j/`basename $i .jpg`.jpg"><img src='$j/`basename $i .jpg`.jpg' width='33%'/></a>" >>$file; done;let counter=$counter+1; echo $counter;
#done

ImagePart 0 #Kickoff

echo "\
<h2>The event page</h2><a href="http://golem.fjfi.cvut.cz/wiki/TrainingCourses/PlasmaSchools/ASPNF.th/18/index"><img src="EventPage.jpg" width="$width%"></img></a>" >> $file

ImagePart 1 # In action

ImagePart 2 #GOLEM


echo "\
<h2>The discharges</h2> Students made 76 discharges<br/>" >> $file

for i in `seq 26054 26130`; do \
#wget -O session/"$i"icon.png http://golem.fjfi.cvut.cz/shots/"$i"/analysis/Basics/0411ShotHomepage.ONN//icon.png?95649; \
#convert session/"$i"icon.png   -background Orange  label:"#$i" +swap  -gravity Center -append session/"$i"iconlbl.png; \
echo "<a href='http://golem.fjfi.cvut.cz/shots/"$i"'><img src='session/"$i"iconlbl.png'/></a>">> $file;done;

ImagePart 3

ImagePart 4

ImagePart 5


echo "\
<h2>The 6 presentations</h2>" >> $file

for i in `seq 1 6`; do echo "<a href="reports/golem_g"$i".pdf"><img src="reports/golem_g"$i"_thb.png" width="25%"></img></a>" >> $file; done

ImagePart 6

echo "\
<h2>The fee for the remote educational session </h2> is to send us a postcard from the venue of remote GOLEM tokamak operation <br/>" >> $file

imgfile=F
echo "\
<a href="PostCard"$imgfile".jpg"><img src="PostCard"$imgfile".jpg" width="$width%"></img></a>" >> $file
imgfile=B
echo "\
<a href="PostCard"$imgfile".jpg"><img src="PostCard"$imgfile".jpg" width="$width%"></img></a><br></br>" >> $file
imgfile=F1
echo "\
<a href="PostCard"$imgfile".jpg"><img src="PostCard"$imgfile".jpg" width="$width%"></img></a>" >> $file
imgfile=B1
echo "\
<a href="PostCard"$imgfile".jpg"><img src="PostCard"$imgfile".jpg" width="$width%"></img></a><br></br>" >> $file


echo "\
<h1>Sincere thanks to all the contributors and participants.</h1>
<h2>Links</h2>
<a href="https://www.facebook.com/fusionschool.thailand/">ASPNF Facebook</a><br></br>
<a href="http://golem.fjfi.cvut.cz/?article=Chronicle/edu">Other educational activities at the GOLEM tokamak</a>
</center></body></html>\
" >> $file



cat $file