YourChinaScienceInvestigation/scripts/create_university_list_data.sh

12 lines
541 B
Bash
Executable file

#!/usr/bin/env sh
echo "Reading entries from lists/canonical_names_of_german_institutions and writing them to web/data.js"
# remove all lines starting with \"
sed '/^\"/d' ../lists/canonical_names_of_german_institutions.txt -i
# creating or overriding a data.js which holds the list of universities in js compatible format
echo "const university_list = " > ../web/data.js
# convert raw list of universities to javascript compatible format
jq -R -s -c 'split("\n")' < ../lists/canonical_names_of_german_institutions.txt >> ../web/data.js