Skip to content

Instantly share code, notes, and snippets.

@jbenet
Created September 11, 2019 22:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jbenet/17fa4c0a48db605f7c0794557d863a74 to your computer and use it in GitHub Desktop.
Save jbenet/17fa4c0a48db605f7c0794557d863a74 to your computer and use it in GitHub Desktop.
#!/usr/bin/env emacs -Q --script
;; Sandbox
(setq
user-emacs-directory (concat (file-name-directory load-file-name) ".emacs/")
package-user-dir (concat user-emacs-directory "elpa/")
use-package-always-ensure t
inhibit-message t) ; if there are errors, remove this.
; debug-on-error t) ; if there are errors, add this.
;; require package
(require 'package)
;; enable melpa
(add-to-list
'package-archives
'("melpa" . "https://melpa.org/packages/")
t)
;; Update package list
(package-initialize)
(require 'use-package)
(use-package ox-hugo)
;; process input
(with-temp-buffer
(progn
(condition-case nil
(let (line)
(while (setq line (read-from-minibuffer ""))
(insert line)
(insert "\n")))
(error nil))
(princ (org-export-as 'hugo))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment