-
Notifications
You must be signed in to change notification settings - Fork 3
/
BUILD_DOCS.sh
56 lines (50 loc) · 1.57 KB
/
BUILD_DOCS.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/env bash
##
## Generates documentation in `./docs/html/index.html`.
## Use Sphinx 2.2.1 or compatible.
##
## BIP39 Mnemonic Phrase Generator and Verifier
##
## Secure Coding Principles and Practices (PA193) https://is.muni.cz/course/fi/autumn2019/PA193?lang=en
## Faculty of Informatics (FI) https://www.fi.muni.cz/index.html.en
## Masaryk University (MU) https://www.muni.cz/en
##
## Team Slytherin: @sobuch, @lsolodkova, @mvondracek.
##
## 2019
set -Eeuo pipefail
command -v sphinx-build >/dev/null 2>&1 || {
echo >&2 "Please install Sphinx==2.2.1 (sphinx-build)"
exit 1
}
command -v sphinx-apidoc >/dev/null 2>&1 || {
echo >&2 "Please install Sphinx==2.2.1 (sphinx-apidoc)"
exit 1
}
project="pa193mnemonicslytherin - BIP39 Mnemonic Phrase Generator and Verifier"
author="Team Slytherin: @sobuch, @lsolodkova, @mvondracek."
version="0.1"
release="0.1.0"
sphinx-apidoc --force --module-first --no-toc \
-H "${project}" -A "${author}" -V "${version}" -R "${release}" \
-o ./docs ./pa193mnemonicslytherin \
"pa193mnemonicslytherin/test_*" "pa193mnemonicslytherin/mnemoniccli.py"
cd ./docs
cat <<'EOF' >index.rst
BIP39 Mnemonic Phrase Generator and Verifier
============================================
.. toctree::
:maxdepth: 4
:caption: Contents:
pa193mnemonicslytherin
EOF
sphinx-build -b singlehtml -C \
-D html_theme=classic \
-D add_module_names=0 \
-D extensions=sphinx.ext.autodoc \
-D project="${project}" \
-D copyright="2019, ${author}" \
-D author="${author}" \
-D version="${version}" \
-D release="${release}" \
. html