# Zdroj je v /GW/TrainingCourses/Production/PresentationBase/present.tex> $GMpath/$2/presentation/present.tex
BNpath=/home/svoboda/buon/GOLEM/web/roperation/tasks
GMpath=/GW
GMwpath=wiki
CreateIndexPage()
{
mkdir -p $GMpath/$2
echo -ne '---\nformat:markdown\ntoc:no\n...\n' > $1
echo -ne '# Tokamak GOLEM for' $3 on $6 >> $1
echo -ne '\n\n## Useful materials\n' >> $1
echo -ne '- [General introductory lecture to the tokamak GOLEM operation](presentation/present.pdf)\n' >> $1
# echo -ne '- [General introductory lecture to the tokamak GOLEM operation (with movies)](presentation/present.zip) (all the files (pdf and mp4s) should be in the same directory)\n' >> $1
echo -ne '- [Tokamak GOLEM wiki](http://golem.fjfi.cvut.cz/wiki/_index)\n' >> $1
echo -ne '- [Basic examples how to reach and analyse the GOLEM data](/Handling/BasicExamples)\n' >> $1
echo -ne '- [Common issues: virtual model & GOLEM tours & data handling & production](http://golem.fjfi.cvut.cz/wiki/TrainingCourses/commons)\n' >> $1
#echo -ne '\n## Control rooms (login:golem)\n' >> $1 #Password issues
echo -ne '\n## Control rooms\n' >> $1
for i in `seq 1 $4`; do \
echo -ne '- Control room for [group '$i'](https://golem.fjfi.cvut.cz/remote/control_room/?identification='$3'+Group+'$i'&access_token='$8')\n' >> $1; \
done
echo -ne '\n## Session archive\n' >> $1
echo -ne '\n## Reports\n' >> $1
echo -ne '\n## Access\n' >> $1
echo -ne '\nLink to this very page: http://golem.fjfi.cvut.cz/'$6'' >> $1
echo -ne '\n
\n' >> $1
echo -ne '\n
Directory structure of this very page (other relevant materials).\n' >> $1
echo -ne '\n## Production issues\n' >> $1
echo -ne '\n* Communication (preferably via chat): skype name: tokamak.golem; gmail: tokamak.golem@gmail.com; videoconference: 147.32.4.55 \n' >> $1
echo -ne '\n* In case of any real-time troubles (tokamak is not a blackboard and chalk), [plan "B" page (archive of previous remote sessions)](http://golem.fjfi.cvut.cz/wiki/TrainingCourses/archive) for off-line usage \n' >> $1
echo -ne '\n## Feedback\n' >> $1
echo -ne '\nWe would like to ask you for feedback after this training in the google form. Thank you in advance. \n' >> $1
echo -ne '\nWe appreciate your comments, suggestions to the system and its functionality. Send us an e-mail\n' >> $1
}
function Presentation ()
{
#Presentation issues:
mkdir -p $GMpath/$2/presentation
qrencode -s 30 -o $GMpath/$2/presentation/qrcode.jpg http://golem.fjfi.cvut.cz/$6
sed "s/GeneralLecture/for {\\\\bf $3} training session/g;s/CurrentLink/$6/g;s/DateToBeIncluded/$7/g" /GW/TrainingCourses/Production/PresentationBase/present.tex> $GMpath/$2/presentation/present.tex
cp /GW/root/GW4reports/makefile $GMpath/$2/presentation/
make -iBs -C $GMpath/$2/presentation finalization
# make -iBs -C $GMpath/$2/presentation thumbnail #0622 ? vypusteno
# Commit:
}
CreateRemoteControlRooms()
{
echo "Run on GM server: "
echo "curl -d 'groupname="$2"&n_groups=$3&event_date="$5"&expire_after_n_days=2&level=2&admin_password=`cat /golem/production/GMcurlpasswd`' https://golem.fjfi.cvut.cz/remote/generate_group_access"
# Tady je jeste neco spatne, nepredava se parametr.
#curl -d 'groupname="$2"&n_groups=$3&event_date="$5"&expire_after_n_days=2&level=2&admin_password=`cat /golem/production/GMcurlpasswd`' https://golem.fjfi.cvut.cz/remote/generate_group_access
}
SetupSession() {
#CreateRemoteControlRooms $1 "$2" $3 $4 $6
#read -p "token?" answer
CreateIndexPage $GMpath/$1/index.page $1 "$2" $3 $4 $5 "$6" $answer
ssh golem@golem "cd /golem/GW;git add .;git commit -a -m 'Automatic Training session generation for $2'";
#cd /golem/GW;git add .;git commit -a -m 'Automatic Training session generation for $2';cd $OLDPWD
}
ZMB()
{
#exit
#exit
#Nastaveni current
# OG pripominka:
ssh -Y svoboda@golem.fjfi.cvut.cz "echo -ne 'Redirect "/$5" http://golem.fjfi.cvut.cz/wiki/"$1"/index\n' >> /etc/apache2/sites-available/GolemRoperationDefault.conf"
#Restart serveru
ssh -Y svoboda@golem.fjfi.cvut.cz xterm -e "sudo sudo systemctl restart apache2.service"
}
#APache issues (via alias@gm)
#ssh -X svoboda@golem.fjfi.cvut.cz xterm -e "sudo emacs -nw /etc/apache2/sites-available/001-golem.conf"
#ssh -X svoboda@golem.fjfi.cvut.cz xterm -e "sudo emacs -nw /etc/apache2/sites-available/GolemRoperationDefault.conf"
#ssh -Y svoboda@golem.fjfi.cvut.cz xterm -e "sudo /etc/init.d/apache2 restart"
# To be run golem@golem
SetupSession TrainingCourses/Universities/NUCE_PSU.us/22/ "NUCE PSU" 4 Null NUCE_PSU "2022-11-14"
#SetupSession TrainingCourses/WorkShops/1022WPA.pa/ "WPA demo at Panana" 2 Null Panama "2022-10-20"
#SetupSession TrainingCourses/Universities/Uni_Ulm.de/22/ "Universität Ulm" 4 Null Ulm "2022-06-29"
#SetupSession TrainingCourses/PlasmaSchools/MPFUS.tn/22/ "2nd Edition-École de la Physique du Plasma et de la Fusion dans la Région" 6 Null Tunis "2022-06-29"
#SetupSession TrainingCourses/HighSchools/SummerCamp.hu/22/ "Hungarian Nuclear Societies summer camp for students" 5 Null Budapest "2022-06-29"
#SetupSession TrainingCourses/Universities/MEPhI_Moscow.ru/21 "National Research Nuclear University MEPhI" 6 Null MEPhI_GAS "2021-03-30"
#SetupSession TrainingCourses/PlasmaSchools/FUMTRAIC.fr/21 "Fusion Master gathering" 4 Null Cadarache "2021-02-15"
#SetupSession TrainingCourses/Universities/TU_Eindhoven.nl/21 "Technical University of Eindhoven" 5 Null Eindhoven "2021-01-06"
#SetupSession TrainingCourses/Universities/MEPhI_Moscow.ru/20GAS "National Research Nuclear University MEPhI" 4 Null MEPhI_GAS "2020-12-20"
#SetupSession TrainingCourses/Universities/Uni_Torino.it/20 "the Torino Politecnico, Italy" 4 Null Torino "2020-12-18"
#SetupSession TrainingCourses/PlasmaSchools/Kiten.bg/20 "Golem remote opearation workshop for the IWSSPP, Bulgaria" 3 Null Kiten "2020-12-03"
#SetupSession TrainingCourses/Universities/BUTE_Budapest.hu/20 "Practical Training for the BUTE, Hungary" 4 Null Budapest "2020-11-02"
#SetupSession TrainingCourses/Universities/MEPhI_Moscow.ru/20 "National Research Nuclear University MEPhI" 4 Null MEPhI "2020-06-01"
# SetupSession TrainingCourses/Universities/CTU.cz/PRA2/20 "Zakladni praktika FJFI CVUT" 16 Null pra2 "2020-05-01"
# SetupSession TrainingCourses/PlasmaSchools/ASPNF.th/20 "The 6th ASEAN School on Plasma and Nuclear Fusion" 6 Null Thai "2020-01-30"
# SetupSession TrainingCourses/Universities/TU_Eindhoven.nl/20 "Technical University of Eindhoven" 5 Null Eindhoven "2020-01-14"
# SetupSession TrainingCourses/Universities/Uni_Torino.it/20 "the Torino Politecnico, Italy" 6 Null Torino "2020-01-15"
# SetupSession Events/ColoursOfOstrava.cz/19 "Colours of Ostrava 19" 2 Null CoO "2019-07-17"
# SetupSession TrainingCourses/PlasmaSchools/PLASAPAR.vn/19 "PLASAPAR 19 Quy Nhon" 2 Null PLASAPAR "2019-07-01"
# SetupSession Events/Demonstrations/0619Madeira.pt "EXP.AT 19 Madeira" 1 Null expat19 "2019-06-15"
# POZOR, ODTED i TrainingCourses!
# SetupSession Universities/CTU.cz/PRA2/19 "Zakladni praktika FJFI CVUT" 20 Null pra2 "2019-06-01"
# SetupSession Universities/MEPhI_Moscow.ru/19 "National Research Nuclear University MEPhI" 2 Null MEPhI "2019-04-16"
# SetupSession PlasmaSchools/GOMTRAIC.cz/19 "GOMTRAIC" 4 Null GOMTRAIC_ "2019-03-04"
# SetupSession PlasmaSchools/FUMTRAIC.fr/19 "Fusion Master gathering" 4 Null Cadarache "2019-02-19"
# SetupSession Universities/TU_Eindhoven.nl/19 "Technical University of Eindhoven" 4 Null Eindhoven "2019-01-18"
# SetupSession PlasmaSchools/ASPNF.th/19 "The 5th ASEAN School on Plasma and Nuclear Fusion" 6 Null Thai "2019-01-23"
# SetupSession Universities/KNU_Kharkov.ua/19 "Kharkov National University" 5 Null Kharkov "March 13, 2019"
# SetupSession Universities/TU_Eindhoven.nl/18b "Technical University of Eindhoven" 4 Null Eindhoven "December 18, 2018"
# SetupSession Universities/Uni_Torino.it/18 "the Torino politecnico, Italy" 6 Null Torino "December 18, 2018"
# SetupSession Universities/Uni_Padova.it/EmilioM/18 "Practical Training 4 the Padova University, Italy" 6 Null Padova "November 23, 2018"
# SetupSession Sandbox/Universities/BUTE_Budapest.hu/18 "Practical Training 4 the BUTE Hungary" 4 Null Budapest "November 19, 2018"
# SetupSession Universities/BUTE_Budapest.hu/18 "Practical Training 4 BUTE Hungary" 4 Null Budapest "November 19, 2018"
# SetupSession HighSchools/Eindhoven.nl/18 "a High school at Eindhoven" 3 Null Eindhoven "March 7, 2018"
# SetupSession PlasmaSchools/ASPNF.th/18 "The 4th ASEAN School on Plasma and Nuclear Fusion" 6 Null Thai "February 1, 2018"
# SetupSession
# SetupSession PlasmaSchools/ASPNF.th/18 "The 4th ASEAN School on Plasma and Nuclear Fusion" 6 Null Thai "February 1, 2018"
# SetupSession FUMTRAIC/18 "Fusion Master gathering" 4 Null Cadarache "February 27, 2018"
# SetupSession Universities/TU_Kobenhavn.dk/18 "Technical University of Denmark" 2 Null Copenhagen "January 15, 2018"
# SetupSession FUMTRAIC/16 "French Master Training Course" 4 Calanque
# SetupSession Universities/TU_Eindhoven.nl/18 "Technical University of Eindhoven" 4 Null Eindhoven
# TEXT z file:///GW/Handling/Controll/RemoteOperation/index.page
# … Tokamak GOLEM is now under your control, so there is no need to ask for my approval for each shot. Make the discharges freely. I only ask you to check after each discharge if everything seems OK. If not, stop submitting discharges # and notice me about the problem ... Enjoy it ..