FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Python-Funscript-Editor/docs/code/generate_doc.sh at main · michael-mueller-git/Python-Funscript-Editor · GitHub
michael-mueller-git
Python-Funscript-Editor
Repository navigation
Code
Issues
6
(6)
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
Python-Funscript-Editor
/
docs
/
code
/
generate_doc.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
49 lines (39 loc) · 1.09 KB
Breadcrumbs
Python-Funscript-Editor
/
docs
/
code
/
generate_doc.sh
Copy path
File metadata and controls
executable file
·
49 lines (39 loc) · 1.09 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#!
/bin/env bash
NAME=
"
funscript_editor
"
IGNORE=( )
if
!
command
-v sphinx-apidoc
;
then
if
command
-v pacman
;
then
#
Arch based
sudo pacman -Sy python3-sphinx python-sphinx_rtd_theme
elif
command
-v apt
;
then
#
Debian based
sudo apt update
sudo apt install python3-sphinx
pip3 install sphinx-rtd-theme
else
pip3 install sphinx sphinx-rtd-theme
fi
fi
if
[
-z
"
$(
pip3 list
|
grep
"
sphinx-rtd-theme
"
)
"
]
;
then
echo
"
install sphinx-rtd-theme
"
pip3 install sphinx-rtd-theme
fi
WDIR=
$PWD
if
[
-f
index.rst ]
;
then
cd
../..
fi
closeHook
() {
cd
"
$WDIR
"
}
trap
closeHook SIGHUP SIGINT SIGTERM EXIT
[
-d
python_env ]
&&
source
python_env/bin/activate
echo
-n
'
python:
'
&&
which python
#
generate doc
rm -vf docs/code/modules.rst
rm -vf docs/code/
$NAME
*
.rst
sphinx-apidoc --implicit-namespaces -M -f -d 3 -o docs/code
$NAME
${IGNORE[@]}
cd
docs/code
&&
make clean html
&&
cd
-
#
view doc
#
[ -f docs/code/_build/html/index.html ] && \
#
command -v firefox && \
#
firefox docs/code/_build/html/index.html & disown
Back
|
FazBrowse Home
|
New Git URL