Created
March 27, 2013 16:34
-
-
Save nomnel/5255756 to your computer and use it in GitHub Desktop.
カレントディレクトリ内のhtmlファイルからmarkdownファイルを作成するシェルスクリプトファイルを作る。
pandoc 1.11.1
Gauche 0.9.3.3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use file.util) | |
(let1 html-files (filter (^f (string=? "html" (cadr (string-split f ".")))) | |
(directory-list (current-directory))) | |
(call-with-output-file "script.sh" | |
(^p (dolist (f html-files) | |
(display (string-append "pandoc -f html -t markdown_github " | |
f " -o " | |
(string-append (car (string-split f ".")) ".md")) | |
p) | |
(newline p))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment