Skip to content

Instantly share code, notes, and snippets.

@meditans
Created February 20, 2016 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meditans/44705593653d6882e0be to your computer and use it in GitHub Desktop.
Save meditans/44705593653d6882e0be to your computer and use it in GitHub Desktop.
#!/usr/bin/emacs --script
;read stdin into a temp buffer
;go into org-mode
;output the buffer as a string and pipe to stdout
(with-temp-buffer
(progn
(condition-case nil
(let (line)
(while (setq line (read-from-minibuffer ""))
(insert line)
(insert "\n")))
(error nil))
(org-mode)
(princ (org-html-export-as-html nil nil nil 'string))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment