Mercurial > hg > rsof
view MHMC/minutes.el @ 589:785661b5b462
as printed and signed
author | Henry S. Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Thu, 21 Nov 2024 15:46:35 +0000 |
parents | 5def9134830d |
children |
line wrap: on
line source
;;; sed 's/^ *//' notes.txt|/c/Program\ Files/Pandoc/pandoc --metadata title="MHMC 2024-07-02" -s -f markdown -t html4 > notes.html ;;; from before pandoc (defalias 'format-action (read-kbd-macro "C-s ACTION: SPC RET C-SPC <M-backspace> <p SPC class='a'> C-M-s C-q C-j C-q C-j RET <backspace> C-b </p>")) (defun fix-html () (interactive) (goto-char (point-min)) (forward-line 2) (sgml-forward-element) (forward-char 1) (kill-region (point-min) (point)) (fix-divs) (goto-char (point-min)) (fix-dls) (goto-char (point-min)) (insert-file "/home/ht/Documents/RSoF/MHMC/doc-head.ent") (goto-char (point-max)) (forward-line -2) (beginning-of-line) (insert "</div>\n") (forward-line 1) (beginning-of-line) (kill-line) (insert "</doc>") (goto-char (point-min)) (replace-string "em>" "emph>") (goto-char (point-min)) (replace-string "strong>" "name>") (goto-char (point-min)) (search-forward "<title>" nil t) 1) (defun fix-dls () (interactive) (replace-string "dl>" "list>") (goto-char (point-min)) (replace-regexp "<dt>\\([^<]*\\)</dt>\n" "<item term='\\1'>") (goto-char (point-min)) (replace-string "<dd>\n" "") (goto-char (point-min)) (replace-string "</dd>" "</item>") ) (defun fix-divs () (interactive) (replace-regexp "^<h.[^>]*>\\([^<]*\\)</h.>" "<div>\n <title>\\1</title>") (goto-char (point-min)) (replace-regexp "\\(</p>\n\\)\\([ ]*\\)\\(<div\\)" "\\1\\2</div>\n\\2\\3") (goto-char (point-min)) (replace-string "<p>ACTION: " "<p class='a'>") (goto-char (point-min)))