#!/bin/bash
cd $RECIPE_DIR/..
mkdir -p $PREFIX/share/doc/anaconda-oss

curl -L https://readthedocs.org/projects/blaze/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/blaze.zip
curl -L https://readthedocs.org/projects/cython/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/cython.zip
curl -L https://readthedocs.org/projects/dask/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/dask.zip
curl -L https://readthedocs.org/projects/ipython/downloads/htmlzip/stable/ > $PREFIX/share/doc/anaconda-oss/ipython.zip
curl -L https://readthedocs.org/projects/jupyter/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/jupyter.zip
curl -L https://readthedocs.org/projects/jupyterlab-tutorial/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/jupyterlab-tutorial.zip
curl -L https://readthedocs.org/projects/jupyter-notebook/downloads/htmlzip/stable/ > $PREFIX/share/doc/anaconda-oss/jupyter-notebook.zip
curl -L https://readthedocs.org/projects/llvmlite/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/llvmlite.zip
curl -L https://readthedocs.org/projects/odo/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/odo.zip
curl -L https://readthedocs.org/projects/pip/downloads/htmlzip/stable/ > $PREFIX/share/doc/anaconda-oss/pip.zip
curl -L https://readthedocs.org/projects/wheel/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/wheel.zip
curl -L https://readthedocs.org/projects/requests/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/requests.zip
curl -L https://readthedocs.org/projects/six/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/six.zip
curl -L https://readthedocs.org/projects/pyopenssl/downloads/htmlzip/stable/ > $PREFIX/share/doc/anaconda-oss/pyopenssl.zip
curl -L https://readthedocs.org/projects/dateutil/downloads/htmlzip/stable/ > $PREFIX/share/doc/anaconda-oss/dateutil.zip
curl -L https://readthedocs.org/projects/cryptography/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/cryptography.zip
curl -L https://readthedocs.org/projects/jinja/downloads/htmlzip/stable/ > $PREFIX/share/doc/anaconda-oss/jinja.zip
curl -L https://readthedocs.org/projects/cffi/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/cffi.zip
curl -L https://readthedocs.org/projects/tornado/downloads/htmlzip/stable/ > $PREFIX/share/doc/anaconda-oss/tornado.zip
curl -L https://readthedocs.org/projects/pillow/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/pillow.zip
curl -L https://readthedocs.org/projects/h5py/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/h5py.zip
curl -L https://readthedocs.org/projects/cython/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/cython.zip
curl -L https://readthedocs.org/projects/coverage/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/coverage.zip
curl -L https://readthedocs.org/projects/psutil/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/psutil.zip
curl -L https://readthedocs.org/projects/yaml/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/yaml.zip
curl -L https://readthedocs.org/projects/distributed/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/distributed.zip
curl -L https://readthedocs.org/projects/ipython/downloads/htmlzip/stable/ > $PREFIX/share/doc/anaconda-oss/ipython.zip
curl -L https://readthedocs.org/projects/pywavelets/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/pywavelets.zip
curl -L https://readthedocs.org/projects/jupyter-core/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/jupyter-core.zip
curl -L https://readthedocs.org/projects/toolz/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/toolz.zip
curl -L https://readthedocs.org/projects/traitlets/downloads/htmlzip/stable/ > $PREFIX/share/doc/anaconda-oss/traitlets.zip
curl -L https://readthedocs.org/projects/zict/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/zict.zip
curl -L https://readthedocs.org/projects/msgpack-python/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/msgpack-python.zip
curl -L https://readthedocs.org/projects/html5lib/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/html5lib.zip
curl -L https://readthedocs.org/projects/python-tblib/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/python-tblib.zip
curl -L https://readthedocs.org/projects/imageio/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/imageio.zip
curl -L https://readthedocs.org/projects/pyzmq/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/pyzmq.zip
curl -L https://readthedocs.org/projects/botocore/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/botocore.zip
curl -L https://readthedocs.org/projects/greenlet/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/greenlet.zip
curl -L https://readthedocs.org/projects/bleach/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-oss/bleach.zip
curl https://pandas.pydata.org/pandas-docs/stable/pandas.zip > $PREFIX/share/doc/anaconda-oss/pandas.zip

# check latest numpy & scipy links: https://docs.scipy.org/doc/
curl https://docs.scipy.org/doc/numpy/numpy-html-1.14.0.zip > $PREFIX/share/doc/anaconda-oss/numpy.zip
curl https://docs.scipy.org/doc/scipy/scipy-html-1.0.0.zip > $PREFIX/share/doc/anaconda-oss/scipy.zip

curl https://media.readthedocs.org/pdf/blaze/latest/blaze.pdf > $PREFIX/share/doc/anaconda-oss/blaze.pdf
curl https://media.readthedocs.org/pdf/cython/latest/cython.pdf > $PREFIX/share/doc/anaconda-oss/cython.pdf
curl https://media.readthedocs.org/pdf/dask/latest/dask.pdf > $PREFIX/share/doc/anaconda-oss/dask.pdf
curl https://media.readthedocs.org/pdf/ipython/stable/ipython.pdf > $PREFIX/share/doc/anaconda-oss/ipython.pdf
curl https://media.readthedocs.org/pdf/jupyter/latest/jupyter.pdf > $PREFIX/share/doc/anaconda-oss/jupyter.pdf
curl https://media.readthedocs.org/pdf/jupyterlab-tutorial/latest/jupyterlab-tutorial.pdf > $PREFIX/share/doc/anaconda-oss/jupyterlab-tutorial.pdf
curl https://media.readthedocs.org/pdf/jupyter-notebook/stable/jupyter-notebook.pdf > $PREFIX/share/doc/anaconda-oss/jupyter-notebook.pdf
curl https://media.readthedocs.org/pdf/llvmlite/latest/llvmlite.pdf > $PREFIX/share/doc/anaconda-oss/llvmlite.pdf
curl https://media.readthedocs.org/pdf/odo/latest/odo.pdf > $PREFIX/share/doc/anaconda-oss/odo.pdf
curl https://media.readthedocs.org/pdf/pip/stable/pip.pdf > $PREFIX/share/doc/anaconda-oss/pip.pdf
curl https://media.readthedocs.org/pdf/wheel/latest/wheel.pdf > $PREFIX/share/doc/anaconda-oss/wheel.pdf
curl https://media.readthedocs.org/pdf/requests/latest/requests.pdf > $PREFIX/share/doc/anaconda-oss/requests.pdf
curl https://media.readthedocs.org/pdf/six/latest/six.pdf > $PREFIX/share/doc/anaconda-oss/six.pdf
curl https://media.readthedocs.org/pdf/pyopenssl/stable/pyopenssl.pdf > $PREFIX/share/doc/anaconda-oss/pyopenssl.pdf
curl https://media.readthedocs.org/pdf/dateutil/stable/dateutil.pdf > $PREFIX/share/doc/anaconda-oss/dateutil.pdf
curl https://media.readthedocs.org/pdf/cryptography/latest/cryptography.pdf > $PREFIX/share/doc/anaconda-oss/cryptography.pdf
curl https://media.readthedocs.org/pdf/jinja/stable/jinja.pdf > $PREFIX/share/doc/anaconda-oss/jinja.pdf
curl https://media.readthedocs.org/pdf/cffi/latest/cffi.pdf > $PREFIX/share/doc/anaconda-oss/cffi.pdf
curl https://media.readthedocs.org/pdf/tornado/stable/tornado.pdf > $PREFIX/share/doc/anaconda-oss/tornado.pdf
curl https://media.readthedocs.org/pdf/pillow/latest/pillow.pdf > $PREFIX/share/doc/anaconda-oss/pillow.pdf
curl https://media.readthedocs.org/pdf/h5py/latest/h5py.pdf > $PREFIX/share/doc/anaconda-oss/h5py.pdf
curl https://media.readthedocs.org/pdf/cython/latest/cython.pdf > $PREFIX/share/doc/anaconda-oss/cython.pdf
curl https://media.readthedocs.org/pdf/coverage/latest/coverage.pdf > $PREFIX/share/doc/anaconda-oss/coverage.pdf
curl https://media.readthedocs.org/pdf/psutil/latest/psutil.pdf > $PREFIX/share/doc/anaconda-oss/psutil.pdf
curl https://media.readthedocs.org/pdf/yaml/latest/yaml.pdf > $PREFIX/share/doc/anaconda-oss/yaml.pdf
curl https://media.readthedocs.org/pdf/distributed/latest/distributed.pdf > $PREFIX/share/doc/anaconda-oss/distributed.pdf
curl https://media.readthedocs.org/pdf/ipython/stable/ipython.pdf > $PREFIX/share/doc/anaconda-oss/ipython.pdf
curl https://media.readthedocs.org/pdf/pywavelets/latest/pywavelets.pdf > $PREFIX/share/doc/anaconda-oss/pywavelets.pdf
curl https://media.readthedocs.org/pdf/jupyter-core/latest/jupyter-core.pdf > $PREFIX/share/doc/anaconda-oss/jupyter-core.pdf
curl https://media.readthedocs.org/pdf/toolz/latest/toolz.pdf > $PREFIX/share/doc/anaconda-oss/toolz.pdf
curl https://media.readthedocs.org/pdf/traitlets/stable/traitlets.pdf > $PREFIX/share/doc/anaconda-oss/traitlets.pdf
curl https://media.readthedocs.org/pdf/zict/latest/zict.pdf > $PREFIX/share/doc/anaconda-oss/zict.pdf
curl https://media.readthedocs.org/pdf/msgpack-python/latest/msgpack-python.pdf > $PREFIX/share/doc/anaconda-oss/msgpack-python.pdf
curl https://media.readthedocs.org/pdf/html5lib/latest/html5lib.pdf > $PREFIX/share/doc/anaconda-oss/html5lib.pdf
curl https://media.readthedocs.org/pdf/python-tblib/latest/python-tblib.pdf > $PREFIX/share/doc/anaconda-oss/python-tblib.pdf
curl https://media.readthedocs.org/pdf/imageio/latest/imageio.pdf > $PREFIX/share/doc/anaconda-oss/imageio.pdf
curl https://media.readthedocs.org/pdf/pyzmq/latest/pyzmq.pdf > $PREFIX/share/doc/anaconda-oss/pyzmq.pdf
curl https://media.readthedocs.org/pdf/greenlet/latest/greenlet.pdf > $PREFIX/share/doc/anaconda-oss/greenlet.pdf
curl https://media.readthedocs.org/pdf/bleach/latest/bleach.pdf > $PREFIX/share/doc/anaconda-oss/bleach.pdf
curl https://pandas.pydata.org/pandas-docs/stable/pandas.pdf > $PREFIX/share/doc/anaconda-oss/pandas.pdf
curl http://scikit-learn.org/stable/_downloads/scikit-learn-docs.pdf > $PREFIX/share/doc/anaconda-oss/scikit-learn-docs.pdf

# check latest numpy & scipy links: https://docs.scipy.org/doc/
curl https://docs.scipy.org/doc/numpy/numpy-ref-1.14.0.pdf > $PREFIX/share/doc/anaconda-oss/numpy-ref.pdf
curl https://docs.scipy.org/doc/numpy/numpy-user-1.14.0.pdf > $PREFIX/share/doc/anaconda-oss/numpy-user.pdf
curl https://docs.scipy.org/doc/scipy/scipy-ref-1.0.0.pdf > $PREFIX/share/doc/anaconda-oss/scipy.pdf
