FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
DBUtils/docs/make.py at main · WebwareForPython/DBUtils · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
WebwareForPython
/
DBUtils
Public
Notifications
You must be signed in to change notification settings
Fork
62
Star
379
Code
Issues
4
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
DBUtils
/
docs
/
make.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
36 lines (29 loc) · 1010 Bytes
Breadcrumbs
DBUtils
/
docs
/
make.py
Copy path
File metadata and controls
executable file
·
36 lines (29 loc) · 1010 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
29
30
31
32
33
34
35
36
#!/usr/bin/env python3.12
"""Build HTML from reST files."""
from
pathlib
import
Path
from
docutils
.
core
import
publish_file
print
(
"Creating the documentation..."
)
for
rst_file
in
Path
().
glob
(
'*.rst'
):
rst_path
=
Path
(
rst_file
)
name
=
Path
(
rst_file
).
stem
lang
=
Path
(
name
).
suffix
if
lang
.
startswith
(
'.'
):
lang
=
lang
[
1
:]
if
lang
==
'zh'
:
lang
=
'zh_cn'
else
:
lang
=
'en'
html_path
=
Path
(
name
+
'.html'
)
print
(
name
,
lang
)
with
rst_path
.
open
(
encoding
=
'utf-8'
)
as
source
, \
html_path
.
open
(
'w'
,
encoding
=
'utf-8'
)
as
destination
:
output
=
publish_file
(
writer_name
=
'html5'
,
source
=
source
,
destination
=
destination
,
enable_exit_status
=
True
,
settings_overrides
=
{
"stylesheet_path"
:
'doc.css'
,
"embed_stylesheet"
:
False
,
"toc_backlinks"
:
False
,
"language_code"
:
lang
,
"exit_status_level"
:
2
})
print
(
"Done."
)
Back
|
FazBrowse Home
|
New Git URL