mirror of
https://github.com/open-mmlab/mmocr.git
synced 2025-06-03 21:54:47 +08:00
[Docs] Refactor docs structure (#662)
* Refactor docs structure * update script paths * update path ignore
This commit is contained in:
parent
bdbeb69076
commit
b04775fd78
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -6,7 +6,6 @@ on:
|
|||||||
- 'README.md'
|
- 'README.md'
|
||||||
- 'README_zh-CN.md'
|
- 'README_zh-CN.md'
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
- 'docs_zh_CN/**'
|
|
||||||
- 'examples/**'
|
- 'examples/**'
|
||||||
- '.dev_scripts/**'
|
- '.dev_scripts/**'
|
||||||
branches:
|
branches:
|
||||||
@ -17,7 +16,6 @@ on:
|
|||||||
- 'README.md'
|
- 'README.md'
|
||||||
- 'README_zh-CN.md'
|
- 'README_zh-CN.md'
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
- 'docs_zh_CN/**'
|
|
||||||
- 'examples/**'
|
- 'examples/**'
|
||||||
- '.dev_scripts/**'
|
- '.dev_scripts/**'
|
||||||
|
|
||||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -65,7 +65,8 @@ instance/
|
|||||||
.scrapy
|
.scrapy
|
||||||
|
|
||||||
# Sphinx documentation
|
# Sphinx documentation
|
||||||
docs/_build/
|
docs/en/_build/
|
||||||
|
docs/zh_cn/_build/
|
||||||
|
|
||||||
# PyBuilder
|
# PyBuilder
|
||||||
target/
|
target/
|
||||||
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
@ -17,7 +17,7 @@ import sys
|
|||||||
|
|
||||||
import pytorch_sphinx_theme
|
import pytorch_sphinx_theme
|
||||||
|
|
||||||
sys.path.insert(0, os.path.abspath('..'))
|
sys.path.insert(0, os.path.abspath('../../'))
|
||||||
|
|
||||||
# -- Project information -----------------------------------------------------
|
# -- Project information -----------------------------------------------------
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ copyright = '2020-2030, OpenMMLab'
|
|||||||
author = 'OpenMMLab'
|
author = 'OpenMMLab'
|
||||||
|
|
||||||
# The full version, including alpha/beta/rc tags
|
# The full version, including alpha/beta/rc tags
|
||||||
version_file = '../mmocr/version.py'
|
version_file = '../../mmocr/version.py'
|
||||||
with open(version_file, 'r') as f:
|
with open(version_file, 'r') as f:
|
||||||
exec(compile(f.read(), version_file, 'exec'))
|
exec(compile(f.read(), version_file, 'exec'))
|
||||||
__version__ = locals()['__version__']
|
__version__ = locals()['__version__']
|
11
docs/en/merge_docs.sh
Executable file
11
docs/en/merge_docs.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# gather models
|
||||||
|
cat ../../configs/kie/*/*.md | sed '$a\\n' | sed "s/md###t/html#t/g" | sed "s/#/#&/" | sed '1i\# Key Information Extraction Models' | sed 's/](\/docs\//](/g' | sed 's=](/=](https://github.com/open-mmlab/mmocr/tree/master/=g' >kie_models.md
|
||||||
|
cat ../../configs/textdet/*/*.md | sed '$a\\n' | sed "s/md###t/html#t/g" | sed "s/#/#&/" | sed '1i\# Text Detection Models' | sed 's/](\/docs\//](/g' | sed 's=](/=](https://github.com/open-mmlab/mmocr/tree/master/=g' >textdet_models.md
|
||||||
|
cat ../../configs/textrecog/*/*.md | sed '$a\\n' | sed "s/md###t/html#t/g" | sed "s/#/#&/" | sed '1i\# Text Recognition Models' | sed 's/](\/docs\//](/g' | sed 's=](/=](https://github.com/open-mmlab/mmocr/tree/master/=g' >textrecog_models.md
|
||||||
|
cat ../../configs/ner/*/*.md | sed '$a\\n' | sed "s/md###t/html#t/g" | sed "s/#/#&/" | sed '1i\# Named Entity Recognition Models' | sed 's/](\/docs\//](/g' | sed 's=](/=](https://github.com/open-mmlab/mmocr/tree/master/=g' >ner_models.md
|
||||||
|
|
||||||
|
# replace special symbols in demo.md
|
||||||
|
cp ../../demo/README.md demo.md
|
||||||
|
sed -i 's/:heavy_check_mark:/Yes/g' demo.md && sed -i 's/:x:/No/g' demo.md
|
@ -1,11 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# gather models
|
|
||||||
cat ../configs/kie/*/*.md | sed '$a\\n' | sed "s/md###t/html#t/g" | sed "s/#/#&/" | sed '1i\# Key Information Extraction Models' | sed 's/](\/docs\//](/g' | sed 's=](/=](https://github.com/open-mmlab/mmocr/tree/master/=g' >kie_models.md
|
|
||||||
cat ../configs/textdet/*/*.md | sed '$a\\n' | sed "s/md###t/html#t/g" | sed "s/#/#&/" | sed '1i\# Text Detection Models' | sed 's/](\/docs\//](/g' | sed 's=](/=](https://github.com/open-mmlab/mmocr/tree/master/=g' >textdet_models.md
|
|
||||||
cat ../configs/textrecog/*/*.md | sed '$a\\n' | sed "s/md###t/html#t/g" | sed "s/#/#&/" | sed '1i\# Text Recognition Models' | sed 's/](\/docs\//](/g' | sed 's=](/=](https://github.com/open-mmlab/mmocr/tree/master/=g' >textrecog_models.md
|
|
||||||
cat ../configs/ner/*/*.md | sed '$a\\n' | sed "s/md###t/html#t/g" | sed "s/#/#&/" | sed '1i\# Named Entity Recognition Models' | sed 's/](\/docs\//](/g' | sed 's=](/=](https://github.com/open-mmlab/mmocr/tree/master/=g' >ner_models.md
|
|
||||||
|
|
||||||
# replace special symbols in demo.md
|
|
||||||
cp ../demo/README.md demo.md
|
|
||||||
sed -i 's/:heavy_check_mark:/Yes/g' demo.md && sed -i 's/:x:/No/g' demo.md
|
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
@ -17,7 +17,7 @@ import sys
|
|||||||
|
|
||||||
import pytorch_sphinx_theme
|
import pytorch_sphinx_theme
|
||||||
|
|
||||||
sys.path.insert(0, os.path.abspath('..'))
|
sys.path.insert(0, os.path.abspath('../../'))
|
||||||
|
|
||||||
# -- Project information -----------------------------------------------------
|
# -- Project information -----------------------------------------------------
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ copyright = '2020-2030, OpenMMLab'
|
|||||||
author = 'OpenMMLab'
|
author = 'OpenMMLab'
|
||||||
|
|
||||||
# The full version, including alpha/beta/rc tags
|
# The full version, including alpha/beta/rc tags
|
||||||
version_file = '../mmocr/version.py'
|
version_file = '../../mmocr/version.py'
|
||||||
with open(version_file, 'r') as f:
|
with open(version_file, 'r') as f:
|
||||||
exec(compile(f.read(), version_file, 'exec'))
|
exec(compile(f.read(), version_file, 'exec'))
|
||||||
__version__ = locals()['__version__']
|
__version__ = locals()['__version__']
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
# Copy *.md files from docs/ if it doesn't have a Chinese translation
|
# Copy *.md files from docs/ if it doesn't have a Chinese translation
|
||||||
|
|
||||||
for filename in $(find ../docs/ -name '*.md' -printf "%P\n");
|
for filename in $(find ../en/ -name '*.md' -printf "%P\n");
|
||||||
do
|
do
|
||||||
mkdir -p $(dirname $filename)
|
mkdir -p $(dirname $filename)
|
||||||
cp -n ../docs/$filename ./$filename
|
cp -n ../en/$filename ./$filename
|
||||||
done
|
done
|
11
docs/zh_cn/merge_docs.sh
Executable file
11
docs/zh_cn/merge_docs.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# gather models
|
||||||
|
cat ../../configs/kie/*/*.md | sed '$a\\n' | sed "s/md###t/html#t/g" | sed "s/#/#&/" | sed '1i\# 关键信息提取模型' | sed 's/](\/docs\//](/g' | sed 's=](/=](https://github.com/open-mmlab/mmocr/tree/master/=g' >kie_models.md
|
||||||
|
cat ../../configs/textdet/*/*.md | sed '$a\\n' | sed "s/md###t/html#t/g" | sed "s/#/#&/" | sed '1i\# 文本检测模型' | sed 's/](\/docs\//](/g' | sed 's=](/=](https://github.com/open-mmlab/mmocr/tree/master/=g' >textdet_models.md
|
||||||
|
cat ../../configs/textrecog/*/*.md | sed '$a\\n' | sed "s/md###t/html#t/g" | sed "s/#/#&/" | sed '1i\# 文本识别模型' | sed 's/](\/docs\//](/g' | sed 's=](/=](https://github.com/open-mmlab/mmocr/tree/master/=g' >textrecog_models.md
|
||||||
|
cat ../../configs/ner/*/*.md | sed '$a\\n' | sed "s/md###t/html#t/g" | sed "s/#/#&/" | sed '1i\# 命名实体识别模型' | sed 's/](\/docs\//](/g' | sed 's=](/=](https://github.com/open-mmlab/mmocr/tree/master/=g' >ner_models.md
|
||||||
|
|
||||||
|
# replace special symbols in demo.md
|
||||||
|
cp ../../demo/README.md demo.md
|
||||||
|
sed -i 's/:heavy_check_mark:/Yes/g' demo.md && sed -i 's/:x:/No/g' demo.md
|
@ -1,11 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# gather models
|
|
||||||
cat ../configs/kie/*/*.md | sed '$a\\n' | sed "s/md###t/html#t/g" | sed "s/#/#&/" | sed '1i\# 关键信息提取模型' | sed 's/](\/docs\//](/g' | sed 's=](/=](https://github.com/open-mmlab/mmocr/tree/master/=g' >kie_models.md
|
|
||||||
cat ../configs/textdet/*/*.md | sed '$a\\n' | sed "s/md###t/html#t/g" | sed "s/#/#&/" | sed '1i\# 文本检测模型' | sed 's/](\/docs\//](/g' | sed 's=](/=](https://github.com/open-mmlab/mmocr/tree/master/=g' >textdet_models.md
|
|
||||||
cat ../configs/textrecog/*/*.md | sed '$a\\n' | sed "s/md###t/html#t/g" | sed "s/#/#&/" | sed '1i\# 文本识别模型' | sed 's/](\/docs\//](/g' | sed 's=](/=](https://github.com/open-mmlab/mmocr/tree/master/=g' >textrecog_models.md
|
|
||||||
cat ../configs/ner/*/*.md | sed '$a\\n' | sed "s/md###t/html#t/g" | sed "s/#/#&/" | sed '1i\# 命名实体识别模型' | sed 's/](\/docs\//](/g' | sed 's=](/=](https://github.com/open-mmlab/mmocr/tree/master/=g' >ner_models.md
|
|
||||||
|
|
||||||
# replace special symbols in demo.md
|
|
||||||
cp ../demo/README.md demo.md
|
|
||||||
sed -i 's/:heavy_check_mark:/Yes/g' demo.md && sed -i 's/:x:/No/g' demo.md
|
|
Loading…
x
Reference in New Issue
Block a user