-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·26 lines (20 loc) · 1.16 KB
/
build.sh
File metadata and controls
executable file
·26 lines (20 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env bash
# validate files for non-unicode
grep -Haxvn '.*' bibliography_files/simoncelli.bib && exit 1
grep -Haxvn '.*' bibliography_files/simoncelli.bibaux && exit 1
grep -Haxvn '.*' bibliography_files/*txt && exit 1
grep -Haxvn '.*' bibliography_files/abstracts/*txt && exit 1
python -c 'import bibtexparser'
val=$?
if [[ $val -ne 0 ]]; then
echo "bibtexparser not found -- did you activate your python environment? run: source .venv/bin/activate"
exit 1
fi
rm -r _site/
python bibliography_files/prepare_bib.py bibliography_files/simoncelli.bib --aux bibliography_files/simoncelli.bibaux --abstracts bibliography_files/abstracts/ --author_url bibliography_files/authorURL.txt --journal_url bibliography_files/journalURL.txt
bundle exec jekyll build -d ./_site/publications
sed -E -i.backup "s/(h2.*)'\{e\}/\1é/g" _site/publications/author.html
sed -E -i.backup "s/(h2.*)\`\{e\}/\1è/g" _site/publications/author.html
rm _site/publications/author.html.backup
# not sure how to get paths working correctly here
bundle exec htmlproofer _site --ignore-urls "/cgi.media.mit.edu/,/sites.stat.columbia.edu/liam/" --checks Links,Scripts,Images > htmlproofer.log 2>&1