summaryrefslogtreecommitdiff
path: root/scripts/readme-to-md.el
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-04-01 01:05:51 -0400
committerKyle Meyer <kyle@kyleam.com>2014-04-01 01:08:00 -0400
commita78a74764e0b2baad914272deac56d83609cad6c (patch)
tree39ec8e2713b84398b54027d4d0444fdf85fe075d /scripts/readme-to-md.el
parent128173bca68b579499a2b01a9e7d64fa96a9b192 (diff)
downloadbog-a78a74764e0b2baad914272deac56d83609cad6c.tar.gz
Move pre-commit files to scripts subdirectory
Diffstat (limited to 'scripts/readme-to-md.el')
-rw-r--r--scripts/readme-to-md.el13
1 files changed, 13 insertions, 0 deletions
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))