Skip to content

Instantly share code, notes, and snippets.

@sugamasao
Created May 26, 2011 07:14
Show Gist options
  • Save sugamasao/992696 to your computer and use it in GitHub Desktop.
Save sugamasao/992696 to your computer and use it in GitHub Desktop.
watchrでrstファイルを監視
# gem install watchr でインストールできるよ
# watchr hogehoge.rb で実行するよ
require 'watchr'
target_file = 'hogehoge.rst'
watch(target_file) do |md|
system("date;rst2html.py #{md[0]} #{File.basename(md[0], '.rst')}.html")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment