Skip to content
Snippets Groups Projects
Commit 03cb912c authored by Lars Buitinck's avatar Lars Buitinck
Browse files

DOC run optipng before uploading website

Conflicts:
	doc/Makefile
parent 4c6227f4
No related merge requests found
......@@ -12,7 +12,7 @@ PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex latexpdf changes linkcheck doctest
.PHONY: help clean html dirhtml pickle json latex latexpdf changes linkcheck doctest optipng
all: html-noplot
......@@ -107,3 +107,9 @@ doctest:
download-data:
python -c "from sklearn.datasets.lfw import check_fetch_lfw; check_fetch_lfw()"
# Optimize PNG files. Needs OptiPNG. Change the -P argument to the number of
# cores you have available, so -P 64 if you have a real computer ;)
optipng:
find _build auto_examples */generated -name '*.png' -print0 \
| xargs -0 -n 1 -P 4 optipng -o10
......@@ -21,13 +21,21 @@ To build the PDF manual, run
Upload the generated doc to sourceforge
---------------------------------------
First of, generate the html documentation::
First off, generate HTML documentation::
make html
This should create a directory _build/html/stable with the documentation in
html format.
Next, make sure you have the PNG optimizer OptiPNG installed.
The PNG files generated by Matplotlib tend to be ~20% too big, and they're
costing us bandwidth. Then issue::
make optipng
This may take some time. If you have a big machine at your disposal,
check the ``Makefile``; it has a hint on how to speed up this target.
Now can upload the generated HTML documentation using scp or some other SFTP
clients.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment