summaryrefslogtreecommitdiff
path: root/scripts/readme-to-md.el
diff options
context:
space:
mode:
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))