forked from italia/spid-cie-oidc-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
52 lines (43 loc) · 1.67 KB
/
tox.ini
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
50
51
[tox]
env = py36,py38
skipsdist = True
[testenv]
deps =
-rrequirements-dev.txt
commands =
doc8 --ignore D001,D002,D003,D004 docs
[testenv:py36-build]
commands =
doc8 --ignore D001,D002,D003,D004 docs
sphinx-build -b html -d html/it/doctrees docs/it/ html/it
sphinx-build -b html -d html/en/doctrees docs/en/ html/en
[testenv:build]
commands =
doc8 --ignore D001,D002,D003,D004 docs
sphinx-build -b html -d html/it/doctrees docs/it/ html/it
sphinx-build -b html -d html/en/doctrees docs/en/ html/en
[testenv:build-single]
commands =
doc8 --ignore D001,D002,D003,D004 docs
sphinx-build -b singlehtml -d html/it/doctrees docs/it/ html/it-single
sphinx-build -b singlehtml -d html/en/doctrees docs/en/ html/it-single
# Replace special characters in docs.
[testenv:refactor]
deps =
whitelist_externals =
find
commands =
find docs -name *.rst -exec sed -i 's/[“”]/"/g; ' \{\} ;
find docs -name *.rst -exec sed -i 's,HTTP header \([a-zA-Z\-]\+\),:httpheader:`\1`,g' \{\} ;
find docs -name *.rst -exec sed -i 's,HTTP method \([a-zA-Z\-]\+\),:httpmethod:`\1`,g' \{\} ;
find docs -name *.rst -exec sed -i 's,HTTP status \([0-9][0-9][0-9]\) \(ok\|not found\|internal server error\|unauthorized\|accepted\|bad request\),:httpstatus:`\1`,gi' \{\} ;
find docs -name *.rst -exec sed -i 's/RFC \([0-9]\+\)/:rfc:`\1`/g' \{\} ;
find docs -name *.rst -exec sed -i 's/\*\*\[:rfc:`\([0-9]\+\)`\]\*\*/ [RFC\1] /g' \{\} ;
# [testenv:latex]
# commands =
# doc8 --ignore D001,D002,D003,D004 docs
# sphinx-build -b latex -D language=it -d _latex/doctrees . _latex/
# [testenv:latex-full]
# commands =
# tox -e latex
# bash -c 'cd _latex && make all-pdf'