Haskell 로 만들어진 converter 로 markdown, MediaWiki, textile, HTML, ms 워드(.docx), epub, PDF 등으로 변환이 가능한 유틸리티
설치
https://github.com/jgm/pandoc/releases 에 연결후 맨 아래 Downloads에서 사용하는 OS 에 맞는 버전 다운로드
Windows, OS X
- Windows - https://github.com/jgm/pandoc/releases/download/1.12.4/pandoc-1.12.4-windows.msi
- Mac OS X - https://github.com/jgm/pandoc/releases/download/1.12.4/pandoc-1.12.4-windows.msi
CentOS
yum install pandoc
Ubuntu
사용
cmd 나 쉘에서 pandoc 명령어로 변환
markdown 변환
test1.md 파일로 저장
test.md
# Test! This is a test of *pandoc*. - list one - list two
cmd 나 쉘에서 다음 명령어 실행
pandoc test1.md -f markdown -t html -s -o test1.html
- -f : from 원본 소스의 포맷(html, json, markdown, docx 등)
- -t : to 변환할 포맷(html, json, markdown, docx 등)
- -s : standalone
- -o : output 출력 파일 이름
test1.md 가 다음 html 로 변환됨
markdown 을 docx 로 변환
pandoc test1.md -f markdown -t docx -s -o test1.docx
Ref