FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-docs-pt-br/scripts/build.sh at 3.10 · python-doc-ja/python-docs-pt-br · GitHub
python-doc-ja
python-docs-pt-br
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
python-docs-pt-br
/
scripts
/
build.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
28 lines (19 loc) · 961 Bytes
Breadcrumbs
python-docs-pt-br
/
scripts
/
build.sh
Copy path
File metadata and controls
executable file
·
28 lines (19 loc) · 961 Bytes
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
#!
/bin/sh
#
Build translated version of Python Docs
[
-n
"
$GITHUB_ACTIONS
"
]
&&
set
-x
set
-e
#
Allow language being passed as 1st argument, defaults to pt_BR
LANGUAGE=
${1
:-
pt_BR}
ROOTDIR=
"
$(
dirname
$0
)
/..
"
cd
${ROOTDIR}
test
-f cpython/Doc/conf.py
||
(
echo
Unable to find proper CPython Doc folder
;
exit
1
;
)
pofiles=
$(
find
.
-maxdepth 2 -name
'
*.po
'
|
sort -u
)
for
po
in
${pofiles}
;
do
install -Dm644
${po}
"
cpython/Doc/locales/
${LANGUAGE}
/LC_MESSAGES/
${po}
"
done
sphinx-build -b html -d build/doctrees -q --keep-going -jauto -D locale_dirs=locales -D language=pt_BR -D gettext_compact=0 -D latex_engine=xelatex -D latex_elements.inputenc= -D latex_elements.fontenc= -W cpython/Doc cpython/Doc/build/html
if
[
-z
"
$GITHUB_ACTIONS
"
]
;
then
echo
"
See file:/
$(
realpath
${ROOTDIR}
)
/cpython/Doc/build/html/index.html
"
echo
"
or serve it in http://localhost:8080 by running:
"
echo
"
python3 cpython/Tools/scripts/serve.py cpython/Doc/build/html
"
fi
Back
|
FazBrowse Home
|
New Git URL