Closed wkentaro closed 9 years ago
方法案
ただこうなると、それぞれの画像にリンク貼りたいとかになりますよね。。(jsk_pcl_ros,jsk_perceptionも同じようにしたくなるはずなので) ということは、index.rstを生成する実行ファイルという話になります。
まじめにやると、mdやらrstのASTを作って画像のリストを作るみたいに成りますが、sed的なもので適当にできるんじゃないかなと思ってます。
たとえば、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
画像ファイルはすべてimagesフォルダにあるからそれを全部並べればいいということではないですか?
そうかも。png -- mdの対応関係がほしいと思うので、適当に正規表現で抜き出したら対応付けは作れる気がしますね
確かに画像ファイルの名前が必ずしも
みたいにはなっていなそうですね。
逆にそういう命名速に合わせる、というのもありですね。
個人的には命名則派ですかね。シンプルなので。
rstでtableを使えばこんな感じで出来ました。 https://github.com/wkentaro/inbox/blob/master/rst-tile-images-with-link/index.rst
これならスクリプトで作るのも簡単そうです。
こんな感じでしょうか。
良い感じだと思います
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