-
Notifications
You must be signed in to change notification settings - Fork 18
/
Makefile
47 lines (36 loc) · 1.66 KB
/
Makefile
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
SHELL = bash
.PHONY: docs servedocs doctoc
servedocs:
mkdocs serve
mkdocsdocs:
mkdocs build
rsync -vau --remove-source-files site/ docs/
rm -rf site
serveswaggerdocs:
echo "Browse to http://localhost:8000/docs/open-api/"
python -m SimpleHTTPServer 8000
swaggerdocs:
wget https://github.com/swagger-api/swagger-ui/archive/master.zip -O temp.zip; unzip -jo temp.zip 'swagger-ui-master/dist/*' -d docs/open-api/; rm temp.zip
sed -i.bak "s/url: \".*\"/url: \"\.\/swagger\.yml\", validatorUrl: null/g" docs/open_api/index.html
echo ".download-url-wrapper { display: none!important; }" >> docs/open_api/swagger-ui.css
rm -f docs/open_api/index.html.bak
docs: mkdocsdocs swaggerdocs
doctoc: ## generate table of contents, doctoc command line tool required
## https://github.com/thlorenz/doctoc
doctoc --github --title " " docs/quick-start.md
bash fix_github_links.sh docs/quick-start.md
doctoc --github --title " " docs/additional-parameters.md
bash fix_github_links.sh docs/additional-parameters.md
doctoc --github --title " " docs/reference/api-reference.md
bash fix_github_links.sh docs/reference/api-reference.md
doctoc --github --title " " docs/reference/search-reference.md
bash fix_github_links.sh docs/reference/search-reference.md
doctoc --github --title " " docs/spreadsheet-integration.md
bash fix_github_links.sh docs/spreadsheet-integration.md
doctoc --github --title " " docs/python-usage.md
bash fix_github_links.sh docs/python-usage.md
# se puede hacer `make test-queries num=200` para hacer un numero de queries
test-queries:
python scripts/api_queries.py $(num) $(url)
pdf:
mkdocs_datosgobar md2pdf mkdocs.yml docs/series-tiempo-ar-api-docs.pdf