diff --git a/org_fix_links.py b/org_fix_links.py index 6527b1d..0e4705c 100755 --- a/org_fix_links.py +++ b/org_fix_links.py @@ -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): diff --git a/util.el b/util.el index bc9e5b8..d8fc30b 100644 --- a/util.el +++ b/util.el @@ -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 -