diff options
author | Kyle Meyer <kyle@kyleam.com> | 2014-04-01 01:05:51 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2014-04-01 01:08:00 -0400 |
commit | a78a74764e0b2baad914272deac56d83609cad6c (patch) | |
tree | 39ec8e2713b84398b54027d4d0444fdf85fe075d /scripts | |
parent | 128173bca68b579499a2b01a9e7d64fa96a9b192 (diff) | |
download | bog-a78a74764e0b2baad914272deac56d83609cad6c.tar.gz |
Move pre-commit files to scripts subdirectory
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/pre-commit | 4 | ||||
-rw-r--r-- | scripts/readme-to-md.el | 13 |
2 files changed, 17 insertions, 0 deletions
diff --git a/scripts/pre-commit b/scripts/pre-commit new file mode 100755 index 0000000..56890a7 --- /dev/null +++ b/scripts/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh + +emacs --batch --load scripts/readme-to-md.el +git add README.md diff --git a/scripts/readme-to-md.el b/scripts/readme-to-md.el new file mode 100644 index 0000000..3303029 --- /dev/null +++ b/scripts/readme-to-md.el @@ -0,0 +1,13 @@ +(defvar org-location "~/src/emacs/org-mode/lisp") + +(when (and org-location (file-exists-p org-location)) + (add-to-list 'load-path org-location) + (require 'org)) +(require 'ox-md) + +(let ((readme-file "bog-readme.org") + exported-file + (final-file "README.md")) + (with-current-buffer (find-file-noselect readme-file) + (setq exported-file (org-md-export-to-markdown))) + (rename-file exported-file final-file t)) |