RxJava Javadoc

2018/04/02 Update: add 2.1.12 doc download point

ReactiveX is cool, as well as RxJava. If you are developing app and using RxJava, of course you often refer RxJava documentations. I would like to refer its javadoc from my local host, but cannot find out a download point. Therefore I make a copy and upload it.

RxJava put its images on github, I don’t want to disturb github everytime when I read Observable page. So, download all images to archive. I also modified css file a bit, since 1024px provides me better reading experience, although I have wide screen monitor.

How I generate it?

  1. use wget

    1
    2
    
    $ wget -r -erobots=off --no-parent http://reactivex.io/RxJava/javadoc/
    find . -name 'index.html*' |xargs -i rm {} && echo 'Index.html clean'
  2. Get images and replace path

    1
    2
    
    $ cd /RxJava/javadoc
    $ ./GET_IMG.sh
  3. copy my own customized css. I prefer 1024px width

GET_IMG.sh is a simple, dirty script, which is written in short time

## GET_IMG.sh

_dirs=`find . -type d`
_grep=`which grep`

function getImg {
  urls=`${_grep} 'github.com.*/images/.*' *.html |sed 's|.*\(https.*png\).*|\1|' |sort |uniq`
  for url in $urls; do
    if [ "z$url" != "z" ]; then
      wget $url
    fi
  done
}

function replacePath {
  sed -ie s,https://.*.github.*/,./, *.html
}

for _dir in $_dirs; do
  pushd $_dir
  getImg $_dir
  replacePath
  popd
done

Here you go, you can build your own RxJava javadoc archive.