本站無留言功能,有問題或發現錯誤,歡迎到twitter戳我,謝謝

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## 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.

Some Git tips ← Prev Next → 成田機場到東京車站