Skip to content

Instantly share code, notes, and snippets.

@meditans
Created February 20, 2016 16:23
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/0f72003e54e15c7b3f31 to your computer and use it in GitHub Desktop.
Save meditans/0f72003e54e15c7b3f31 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
(let (line)
(while (setq line (ignore-errors (read-from-minibuffer "")))
(insert line "\n")))
;; I need the last version of htmlize, which I stored and compiled in the
;; private subdir of .emacs.d
(add-to-list 'load-path "~/.emacs.d/private/")
(org-mode)
(org-html-export-as-html)
(princ (buffer-string))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment