annotate MHMC/minutes.el @ 570:63ec4f635117

from me via Neil
author Henry S Thompson <ht@inf.ed.ac.uk>
date Tue, 12 Nov 2024 18:08:27 +0000
parents 5def9134830d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
548
5def9134830d unknown
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 533
diff changeset
1 ;;; sed 's/^ *//' notes.txt|/c/Program\ Files/Pandoc/pandoc --metadata title="MHMC 2024-07-02" -s -f markdown -t html4 > notes.html
5def9134830d unknown
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 533
diff changeset
2
5def9134830d unknown
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 533
diff changeset
3 ;;; from before pandoc
5def9134830d unknown
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 533
diff changeset
4 (defalias 'format-action (read-kbd-macro
5def9134830d unknown
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 533
diff changeset
5 "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>"))
495
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
6
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
7 (defun fix-html ()
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
8 (interactive)
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
9 (goto-char (point-min))
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
10 (forward-line 2)
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
11 (sgml-forward-element)
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
12 (forward-char 1)
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
13 (kill-region (point-min) (point))
548
5def9134830d unknown
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 533
diff changeset
14 (fix-divs)
5def9134830d unknown
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 533
diff changeset
15 (goto-char (point-min))
495
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
16 (fix-dls)
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
17 (goto-char (point-min))
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
18 (insert-file "/home/ht/Documents/RSoF/MHMC/doc-head.ent")
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
19 (goto-char (point-max))
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
20 (forward-line -2)
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
21 (beginning-of-line)
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
22 (insert "</div>\n")
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
23 (forward-line 1)
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
24 (beginning-of-line)
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
25 (kill-line)
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
26 (insert "</doc>")
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
27 (goto-char (point-min))
496
34129b221ffa _ for italic, ** or __ for bold
Henry Thompson <ht@markup.co.uk>
parents: 495
diff changeset
28 (replace-string "em>" "emph>")
34129b221ffa _ for italic, ** or __ for bold
Henry Thompson <ht@markup.co.uk>
parents: 495
diff changeset
29 (goto-char (point-min))
34129b221ffa _ for italic, ** or __ for bold
Henry Thompson <ht@markup.co.uk>
parents: 495
diff changeset
30 (replace-string "strong>" "name>")
34129b221ffa _ for italic, ** or __ for bold
Henry Thompson <ht@markup.co.uk>
parents: 495
diff changeset
31 (goto-char (point-min))
548
5def9134830d unknown
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 533
diff changeset
32 (search-forward "<title>" nil t)
496
34129b221ffa _ for italic, ** or __ for bold
Henry Thompson <ht@markup.co.uk>
parents: 495
diff changeset
33 1)
495
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
34
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
35 (defun fix-dls ()
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
36 (interactive)
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
37 (replace-string "dl>" "list>")
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
38 (goto-char (point-min))
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
39 (replace-regexp "<dt>\\([^<]*\\)</dt>\n" "<item term='\\1'>")
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
40 (goto-char (point-min))
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
41 (replace-string "<dd>\n" "")
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
42 (goto-char (point-min))
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
43 (replace-string "</dd>" "</item>")
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
44 )
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
45 (defun fix-divs ()
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
46 (interactive)
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
47 (replace-regexp "^<h.[^>]*>\\([^<]*\\)</h.>" "<div>\n <title>\\1</title>")
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
48 (goto-char (point-min))
548
5def9134830d unknown
Henry S Thompson <ht@inf.ed.ac.uk>
parents: 533
diff changeset
49 (replace-regexp "\\(</p>\n\\)\\([ ]*\\)\\(<div\\)" "\\1\\2</div>\n\\2\\3")
495
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
50 (goto-char (point-min))
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
51 (replace-string "<p>ACTION: " "<p class='a'>")
b3cffcadc1c2 for fixup of pandoc output
Henry Thompson <ht@markup.co.uk>
parents:
diff changeset
52 (goto-char (point-min)))