Presentations/scripts.sh

#!/bin/bash

RETVAL=0

case "$1" in
   "") 
      echo "Usage: $0 [-p|--preprocess] [-i|--image]"
      RETVAL=1
      ;;
   --conferences|-c)
      rm -f conferences.incl;
      index=1;
      for i in  "Conferences/ECPD/3rd_Lisbon_2019" "Conferences/EPS/46th_Milan_2019/REprobe"  "Conferences/EPS/46th_Milan_2019/FusionEducation"  "Conferences/SOFT/30th_GiardiniNaxos_2018" "Conferences/EPS/45th_Prague_2018"  "Conferences/EPS/44th_Belfast_2017"  "Conferences/EPS/43rd_Leuven_2016" "Conferences/EPS/42nd_Lisbon_2015"   "Conferences/EPS/41st_Berlin_2014" "Conferences/SOFT/28th_SanSebastian_2014/Stabilization"  "Conferences/SOFT/28th_SanSebastian_2014/IronCoreModel" "Conferences/EPS/40th_Espoo_2013" "Conferences/EPS/39th_Stockholm_2012/HTS" "Conferences/HTPD/19th_Monterey_2012" "Conferences/SOFT/27th_Liege_2012/HTS" "Conferences/SOFT/27th_Liege_2012/IronCoreModel" "Conferences/EPS/39th_Stockholm_2012/Overview" "Conferences/EPS/38th_Strasbourg_2011"  "Conferences/SOFT/26th_Porto_2010"  "Conferences/EPS/37th_Dublin_2010" ;
      #for i in "37th_EPS_Dublin_2010" "26th_SOFT_Porto_2010"; # BACHA, nejde individualne ...
      	do echo $i;
	cd $i;
	echo "<tr><td>$index</td><td>"`echo $i|sed 's/_/ /g'`"</td>" > event.html;
	for j in   "abstract" "poster" "paper"; do 
	  echo $j;
	  if [ -f $j.pdf ]; then
	  pdftocairo -singlefile -scale-to 200 -jpeg $j.pdf;
	  echo "<td><a href="/wiki/Presentations/$i/$j.pdf"><img src='/wiki/Presentations/$i/$j.jpg'></a></td>" >>event.html;
	  else 
	  echo "<td><a href="`grep 'link=' metainfo.page|awk -F '=' '{print $2}'`"><img src='/wiki/Presentations/$i/$j.jpg'></a></td>" >>event.html;
	  fi;
	  done;
	  echo "</tr>" >> event.html;cd $OLDPWD;
      echo "<?php include ("\"\$GW/Presentations/$i/event.html\"") ?>">>conferences.incl;
      let index=$index+1;
      done;
      ;;
   --papers|-p)
      rm -f papers.incl;
      index=1;
      for i in "Journals/JINST/19REstudyInGolem/" "Journals/IEEE/NSS-MIC/18/" "Journals/IEEE/EXPAT/19/experimentation" "Conferences/SOFT/30th_GiardiniNaxos_2018" "Conferences/IAEA/CDARPFR/15Ahmedabad" "Journals/NuclFus/15"  "Conferences/SOFT/28th_SanSebastian_2014/Stabilization"  "Conferences/SOFT/28th_SanSebastian_2014/IronCoreModel" "Conferences/SOFT/27th_Liege_2012/HTS" "Conferences/SOFT/27th_Liege_2012/IronCoreModel" "Conferences/HTPD/19th_Monterey_2012" "Conferences/SOFT/26th_Porto_2010";
	do echo $i;
	#pdftocairo -f 2 -l 2 -singlefile -scale-to 200 -jpeg Dhyani_2019_J._Inst._14_C09029.pdf
	cd $i;
	echo "<tr><td>$index</td><td><a href="`grep 'link=' metainfo.page|awk -F '=' '{print $2}'`"><b>"`grep 'title=' metainfo.page|awk -F '=' '{print $2}'`"</b></br>" > paper.html;
	echo ""`grep 'journal=' metainfo.page|awk -F '=' '{print $2}'`"</br>" >> paper.html;
	echo ""`grep 'specification=' metainfo.page|awk -F '=' '{print $2}'`"</a></td>" >> paper.html;
	echo "<td><a href="`grep 'link=' metainfo.page|awk -F '=' '{print $2}'`"><img src='/wiki/Presentations/$i/paper.jpg'></a></td>" >>paper.html;
	echo "</tr>" >> paper.html;cd $OLDPWD;
      echo "<?php include ("\"\$GW/Presentations/$i/paper.html\"") ?>">>papers.incl;
      let index=$index+1;
      done;
      ;;

   --EPSkyZIP|-z)
      rm -f papers.incl;
      zip EPSky -r `for i in *EPS*; do echo $i;done`
      ;;
      
      --image|-i)
      echo i
      ;;
   --epsky|-e)
      rm -f eps.incl;
      index=1;
      for i in "Conferences/EPS/46th_Milan_2019/REprobe"  "Conferences/EPS/46th_Milan_2019/FusionEducation"  "Conferences/EPS/45th_Prague_2018"  "Conferences/EPS/44th_Belfast_2017"  "Conferences/EPS/43rd_Leuven_2016" "Conferences/EPS/42nd_Lisbon_2015"   "Conferences/EPS/41st_Berlin_2014" "Conferences/EPS/40th_Espoo_2013" "Conferences/EPS/39th_Stockholm_2012/HTS"  "Conferences/EPS/39th_Stockholm_2012/Overview" "Conferences/EPS/38th_Strasbourg_2011"  "Conferences/EPS/37th_Dublin_2010" ;
      #for i in "37th_EPS_Dublin_2010" "26th_SOFT_Porto_2010"; # BACHA, nejde individualne ...
      	do echo $i;
	cd $i;
	echo "<tr><td>$index</td><td>"`echo $i|sed 's/_/ /g'`"</td>" > event.html;
	for j in   "abstract" "poster" "paper"; do 
	  echo $j;
	  if [ -f $j.pdf ]; then
	  pdftocairo -singlefile -scale-to 200 -jpeg $j.pdf;
	  echo "<td><a href="/wiki/Presentations/$i/$j.pdf"><img src='/wiki/Presentations/$i/$j.jpg'></a></td>" >>event.html;
	  else 
	  echo "<td><a href="`grep 'link=' metainfo.page|awk -F '=' '{print $2}'`"><img src='/wiki/Presentations/$i/$j.jpg'></a></td>" >>event.html;
	  fi;
	  done;
	  echo "</tr>" >> event.html;cd $OLDPWD;
      echo "<?php include ("\"\$GW/Presentations/$i/event.html\"") ?>">>eps.incl;
      let index=$index+1;
      done;
      ;;

esac

exit $RETVAL
exit