util.el can now add front-matter to org-exported-to-md

This commit is contained in:
Chris Hodapp 2020-04-22 10:04:42 -04:00
parent 8274f7442e
commit e26a98b711
2 changed files with 6 additions and 1 deletions

View File

@ -39,6 +39,7 @@ def fix_image_link(m):
for n,line in enumerate(sys.stdin):
for g1,_ in proper_link_re.findall(line):
#print("FOUND: {}".format(g1))
seen.add(g1)
seen_line[g1] = n+1
for g1 in link_re.findall(line):

View File

@ -55,11 +55,15 @@
(with-current-buffer (filter-buffer fname "tmp.org" tag)
(write-file "./_tmp_filtered.org"))))
(setq extra-boilerplate
"toc = true\n")
(defun export-run ()
(find-file "./_tmp_filtered2.org")
(princ "Exporting with ox-hugo...\n")
(org-hugo-export-as-md)
(goto-line 3)
(insert extra-boilerplate)
(write-file "./log.md"))
;; TODO: use command-line-args so that I can pass in the filename
;; instead of hard-code it