jsk-ros-pkg / jsk_visualization

jsk visualization ros packages
https://github.com/jsk-ros-pkg/jsk_visualization
324 stars 173 forks source link

tile images on top page of readthedocs #502

Closed wkentaro closed 9 years ago

wkentaro commented 9 years ago

suggested at: https://github.com/jsk-ros-pkg/jsk_visualization/issues/485#issuecomment-145431501 by: @garaemon

like http://matplotlib.org/gallery.html

assigned to: @wkentaro

wkentaro commented 9 years ago

方法案

wkentaro commented 9 years ago

ただこうなると、それぞれの画像にリンク貼りたいとかになりますよね。。(jsk_pcl_ros,jsk_perceptionも同じようにしたくなるはずなので) ということは、index.rstを生成する実行ファイルという話になります。

garaemon commented 9 years ago

まじめにやると、mdやらrstのASTを作って画像のリストを作るみたいに成りますが、sed的なもので適当にできるんじゃないかなと思ってます。

garaemon commented 9 years ago

たとえば、texから画像ファイルを抜き出して、そのファイルを調べるスクリプト

#!/bin/bash

TEXFILE=2015-Humanoids-ueda-drc-system.tex

FILES=$(grep "\.png\|\.jpg\|\.jpeg\|\.eps\|\.PNG\|\.JPG\|\.JPEG\|\.EPS" $TEXFILE | sed -e "s/.*{\(.*\)}.*/\1/")
ls -lht $FILES -S
wkentaro commented 9 years ago

画像ファイルはすべてimagesフォルダにあるからそれを全部並べればいいということではないですか?

garaemon commented 9 years ago

そうかも。png -- mdの対応関係がほしいと思うので、適当に正規表現で抜き出したら対応付けは作れる気がしますね

wkentaro commented 9 years ago

確かに画像ファイルの名前が必ずしも

みたいにはなっていなそうですね。

garaemon commented 9 years ago

逆にそういう命名速に合わせる、というのもありですね。

wkentaro commented 9 years ago

個人的には命名則派ですかね。シンプルなので。

wkentaro commented 9 years ago

rstでtableを使えばこんな感じで出来ました。 https://github.com/wkentaro/inbox/blob/master/rst-tile-images-with-link/index.rst

wkentaro commented 9 years ago

これならスクリプトで作るのも簡単そうです。

wkentaro commented 9 years ago

こんな感じでしょうか。 image

garaemon commented 9 years ago

良い感じだと思います