-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexport-docx.sh
37 lines (32 loc) · 1.07 KB
/
export-docx.sh
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
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
#
#
# This script will use pandoc to generate docx files from the listed html files. Files must be included manually
#
# To use this file
# - add shebang: '#!/bin/sh'
# - make executable: `chmod +x <filename>`
# - execute script: ./<filename>
# clean up any old files
pwd
rm -fr docx
# move into build directory
echo 'moving into build directory...'
cd book/_build/html
# clean up the old directory if it exists
echo 'cleaning up files...'
rm -fr docx
mkdir docx
# generate docx
echo 'generating docx files...'
pandoc -s index.html -o docx/index.docx
pandoc -s appendix-theory.html -o docx/appendix-theory.docx
pandoc -s conclusion.html -o docx/conclusion.docx
pandoc -s math-prereq.html -o docx/math-prereq.docx
pandoc -s motivating-example.html -o docx/motivating-example.docx
pandoc -s solution-process.html -o docx/solution-process.docx
pandoc -s worked-examples.html -o docx/worked-examples.docx
# move docx folder back to same folder as this script
echo 'moving files out of build directory...'
# mv docx ....
mv docx /mnt/c/projects/Code/eigenbooks/bayes-missing-manual