File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ PAPEROPT_a4 = -D latex_paper_size=a4
12
12
PAPEROPT_letter = -D latex_paper_size=letter
13
13
ALLSPHINXOPTS = -d $(BUILDDIR ) /doctrees $(PAPEROPT_$(PAPER ) ) $(SPHINXOPTS ) .
14
14
15
- .PHONY : help clean html dirhtml pickle json htmlhelp qthelp latex latexpdf changes linkcheck doctest
15
+ .PHONY : help clean html dirhtml pickle json latex latexpdf changes linkcheck doctest optipng
16
16
17
17
all : html-noplot
18
18
@@ -107,3 +107,9 @@ doctest:
107
107
108
108
download-data :
109
109
python -c " from sklearn.datasets.lfw import check_fetch_lfw; check_fetch_lfw()"
110
+
111
+ # Optimize PNG files. Needs OptiPNG. Change the -P argument to the number of
112
+ # cores you have available, so -P 64 if you have a real computer ;)
113
+ optipng :
114
+ find _build auto_examples * /generated -name ' *.png' -print0 \
115
+ | xargs -0 -n 1 -P 4 optipng -o10
Original file line number Diff line number Diff line change @@ -21,13 +21,21 @@ To build the PDF manual, run
21
21
Upload the generated doc to sourceforge
22
22
---------------------------------------
23
23
24
- First of , generate the html documentation::
24
+ First off , generate HTML documentation::
25
25
26
26
make html
27
27
28
28
This should create a directory _build/html/stable with the documentation in
29
29
html format.
30
30
31
+ Next, make sure you have the PNG optimizer OptiPNG installed.
32
+ The PNG files generated by Matplotlib tend to be ~20% too big, and they're
33
+ costing us bandwidth. Then issue::
34
+
35
+ make optipng
36
+
37
+ This may take some time. If you have a big machine at your disposal,
38
+ check the ``Makefile``; it has a hint on how to speed up this target.
31
39
32
40
Now can upload the generated HTML documentation using scp or some other SFTP
33
41
clients.
You can’t perform that action at this time.
0 commit comments