Skip to content

Instantly share code, notes, and snippets.

@u1and0
Last active February 3, 2021 01:43
Show Gist options
  • Save u1and0/22e392f1526cf07c4fe226a04cc5f39e to your computer and use it in GitHub Desktop.
Save u1and0/22e392f1526cf07c4fe226a04cc5f39e to your computer and use it in GitHub Desktop.
Convert Markdown file to HTML file every 3sec using pandoc
#!/bin/sh
# Convert Markdown file to HTML file every 3sec using pandoc
# 引数に渡したmarkdownファイルを3秒ごとにpandocを通してhtml化する
# Requirement
# * docker
# * pandoc/core (docker container)
# Usage
# $ ~/sh/autopandoc.sh ./hoge.md
# then extract hoge.html
# Recommendation
# Firefox addon 'Auto Reload Tab'
while sleep 3; do
docker run -t --rm -v ${PWD}:/work pandoc/core /work/$1 > $(basename $1 .md).html
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment