diff --git a/preprocMd.sh b/preprocMd.sh new file mode 100755 index 0000000000000000000000000000000000000000..a4510b0a3201df339639157437a1f1780ef27480 --- /dev/null +++ b/preprocMd.sh @@ -0,0 +1,43 @@ +#!/bin/bash + + # generate namelist of collaborators from topic file + original="topic-template.md" + filename="topic-output.md" + baseurl='https://www.mat.tuhh.de' + + #make output copy + cp $original $filename + + #replace working group + for wg in {aa,cm,dm,nm,st} + do + fullname=`wget -qO- $baseurl/forschung/$wg | grep h1 | sed -e "s/<h1>\s*\(.*\)<\/h1>.*$/\1/g" | sed -e 's/^[ \t]*//'` + sed -i "s;### Working Groups:\(.*\)$wg\(.*\);### Working Groups:\1\[$fullname\]($baseurl/forschung/$wg)\2;g" $filename + done + + + namelist=`grep -h -i -m 1 -r "###\s*Collaborators (MAT):" $filename | sed -e 's/^###\s*Collaborators (MAT):\s*//I' -e 's/\s*,\s*/\n/g' | sort -u` + for name in $namelist + do + # pipeline to get full name of staff-member from mat-homepage + # -> wget the staff homepage of $name + # -> grep the line with the <h1>-tag, something like <h1>Fabian Gabel, M. Sc.</h1><div class='staffIntro'><p><img src='/home/fgabel/images/portrait.png' title='Foto von Fabian Gabel, M. Sc.' class='staffPicture'></p><div class='staffContact'> + # -> strip the string such that only the portion between <h1></h1> remains + # -> remove leading spaces + fullname=`wget -qO- $baseurl/home/$name/?homepage_id=$name | grep h1 | sed -e "s/<h1>\s*\(.*\)<\/h1>.*$/\1/g" | sed -e 's/^[ \t]*//'` + + # dirty replacement to avoid dealing with + errstr='Binary file (standard input) matches' + if [ "$fullname" = "$errstr" ]; + then + fullname=`echo "$name $fullname" | \ + sed -e "s;jgrossmann $errstr;Dr. Julian Großmann;g" \ + -e "s;fbuenger $errstr;Dr. Florian Bünger;g" \ + -e "s;hvoss $errstr;Prof. Dr. Heinrich Voß;g" \ + -e "s;fboesch $errstr;Dipl. Ing. Frank Bösch;g" \ + -e "s;sgoetschel $errst;Dr. Sebastian Götschel;g"` + fi + + # replace name in .md file + sed -i "s;$name;\[$fullname\]($baseurl/home/$name);g" $filename + done \ No newline at end of file diff --git a/topic-template.md b/topic-template.md new file mode 100644 index 0000000000000000000000000000000000000000..263d21b7556eb93382d1e27f13fb6a4b684df196 --- /dev/null +++ b/topic-template.md @@ -0,0 +1,26 @@ +# The Title of our Impressive Reasearch Project + +### Working Groups: aa, cm, dm, nm, st + +### Collaborators (MAT): ataraz, cseifert, dclemens, dgallaun, druprecht, fboesch, fbuenger, fgabel, fhamann, hruan, hvoss, jangel, jdornemann, jfregin, jgrams, jgrossmann, jmeichsner, jpmzemke, jurizarna, kalbrecht, kklioba, kkruse, mjanssen, mlindner, mschulte, mwolkner, pbaasch, pgupta, rbeddig, rukena, sgoetschel, sleborne, sotten, tsaathoff, vgriem, vtrapp, wleinen, wmackens, ymogge + +### Collaborators (External): [Vaughan Jones](https://as.vanderbilt.edu/math/bio/?who=vaughan-jones), [Terry Tao](https://terrytao.wordpress.com/about/) + +## Description + +My topic is about Math and contains some nice inline formulas like $\int_0^1 \sin(x) \mathrm{d}x$ and also some displayed formulas like + +$$ +\int_0^1 \sin(x) \mathrm{d}x +$$ + +It also contains some nice pictures + + + + + +## References + +[1] Integrability Methods in Harmonic Galois Theory. F. Gabel, M. Chebyshev, Z. B. Hadamard and N. Deligne. Available at [https://thatsmathematics.com/mathgen/](https://thatsmathematics.com/mathgen/paper.php?nameType%5B1%5D=custom&customName%5B1%5D=F.+Gabel&nameType%5B2%5D=famous&nameType%5B3%5D=famous&nameType%5B4%5D=famous&seed=126904073&format=pdf +) \ No newline at end of file