Skip to content
Snippets Groups Projects
Commit dc09d73d authored by Fabian Nuraddin Alexander Gabel's avatar Fabian Nuraddin Alexander Gabel :speech_balloon:
Browse files

fix paths for html-hyperlinks

parent 85c57d91
No related branches found
No related tags found
No related merge requests found
......@@ -2,21 +2,22 @@
# generate namelist of collaborators from topic file
original="./topics/topic-template.md"
filename="./build/topic-template-build.md"
filename="topic-template.md"
build_dir="./build"
baseurl='https://www.mat.tuhh.de'
#make output copy
cp $original $filename
cp $original $build_dir/$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
sed -i "s;### Working Groups:\(.*\)$wg\(.*\);### Working Groups:\1\[$fullname\]($baseurl/forschung/$wg)\2;g" $build_dir/$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`
namelist=`grep -h -i -m 1 -r "###\s*Collaborators (MAT):" $build_dir/$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
......@@ -39,12 +40,12 @@
fi
# replace name in .md file
sed -i "s;$name;\[$fullname\]($baseurl/home/$name);g" $filename
sed -i "s;$name;\[$fullname\]($baseurl/home/$name);g" $build_dir/$filename
echo "# $fullname" > ./build/$name.md
# append research to staffiles
title="## `head -n 1 $filename | sed -e "s;#\s*;\[;g" -e "s;\(.*\);\1\]($filename);g"`"
title="## `head -n 1 $build_dir/$filename | sed -e "s;#\s*;\[;g" -e "s;\(.*\);\1\](${filename%.md}.html);g"`"
echo $title >> ./build/$name.md
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment