util.el can now add front-matter to org-exported-to-md
This commit is contained in:
parent
8274f7442e
commit
e26a98b711
@ -39,6 +39,7 @@ def fix_image_link(m):
|
|||||||
|
|
||||||
for n,line in enumerate(sys.stdin):
|
for n,line in enumerate(sys.stdin):
|
||||||
for g1,_ in proper_link_re.findall(line):
|
for g1,_ in proper_link_re.findall(line):
|
||||||
|
#print("FOUND: {}".format(g1))
|
||||||
seen.add(g1)
|
seen.add(g1)
|
||||||
seen_line[g1] = n+1
|
seen_line[g1] = n+1
|
||||||
for g1 in link_re.findall(line):
|
for g1 in link_re.findall(line):
|
||||||
|
|||||||
6
util.el
6
util.el
@ -55,11 +55,15 @@
|
|||||||
(with-current-buffer (filter-buffer fname "tmp.org" tag)
|
(with-current-buffer (filter-buffer fname "tmp.org" tag)
|
||||||
(write-file "./_tmp_filtered.org"))))
|
(write-file "./_tmp_filtered.org"))))
|
||||||
|
|
||||||
|
(setq extra-boilerplate
|
||||||
|
"toc = true\n")
|
||||||
|
|
||||||
(defun export-run ()
|
(defun export-run ()
|
||||||
(find-file "./_tmp_filtered2.org")
|
(find-file "./_tmp_filtered2.org")
|
||||||
(princ "Exporting with ox-hugo...\n")
|
(princ "Exporting with ox-hugo...\n")
|
||||||
(org-hugo-export-as-md)
|
(org-hugo-export-as-md)
|
||||||
|
(goto-line 3)
|
||||||
|
(insert extra-boilerplate)
|
||||||
(write-file "./log.md"))
|
(write-file "./log.md"))
|
||||||
;; TODO: use command-line-args so that I can pass in the filename
|
;; TODO: use command-line-args so that I can pass in the filename
|
||||||
;; instead of hard-code it
|
;; instead of hard-code it
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user