Zpy Docs Generator - auto translate Python Library API to Zpy API, and generate Zpy Lib Docs
Zpy Lib API is a Chinese mapping of the Python API
example
{
"name":"test",
"zpy":"测试",
"functions":[
{
"name":"threading_cleanup",
"zpy":"线程清理"
},
{
"name":"run_with_locale",
"zpy":"运行与语言环境"
},
],
"args":[
{
"name":"cpython",
"zpy":"cpython"
},
{
"name":"captured_stdout",
"zpy":"捕捉到stdout"
},
]
}clone this repo
git clone https://github.com/louisyoungx/zpy-docs-generator.git
cd zpy-docs-generatorinstall dependences
pip install requests, scrapy, jieba, wordninjadownload dictionary
wget https://resource.rocke.top/zpy/dictionary_lite.csv
mv dictionary_lite.csv dics
generate python builtin lib docs
python3 main.pythe lib docs is in libs/ directory
ls libsedit config.py
- change
URL - change
LIB_NAME, exp:requests-libs
edit lib.py
- let
libsin 19 line return list of url, exp:['string.html', 'time.html']
edit module.py
- change xpath expression of
name,methods,paramsin 16, 17, 18 line
generate third-party lib docs
python3 main.pythe lib docs is in YOUR-LIB-NAME directory
ls requests-libsgit checkout requestsgenerate requests lib docs
python3 main.pythe lib docs is in requests-libs directory
ls requests-libs