Created
November 14, 2011 10:08
-
-
Save dchest/1363656 to your computer and use it in GitHub Desktop.
rst-to-html (emacs)
This file contains hidden or 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
| (defun rst-to-html () | |
| "Convert current file from reStructuredText to HTML, outputting to file.html." | |
| (interactive) | |
| (when (not (stringp (buffer-file-name))) | |
| (error "No file name")) | |
| (message "Running...") | |
| (shell-command | |
| (concat "rst2html -d " | |
| (shell-quote-argument (buffer-file-name)) | |
| " " | |
| (shell-quote-argument (concat | |
| (file-name-sans-extension (buffer-file-name)) | |
| ".html"))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment