Mercurial > hg > rsof
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 |
rev | line source |
---|---|
548 | 1 ;;; sed 's/^ *//' notes.txt|/c/Program\ Files/Pandoc/pandoc --metadata title="MHMC 2024-07-02" -s -f markdown -t html4 > notes.html |
2 | |
3 ;;; from before pandoc | |
4 (defalias 'format-action (read-kbd-macro | |
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 | 6 |
7 (defun fix-html () | |
8 (interactive) | |
9 (goto-char (point-min)) | |
10 (forward-line 2) | |
11 (sgml-forward-element) | |
12 (forward-char 1) | |
13 (kill-region (point-min) (point)) | |
548 | 14 (fix-divs) |
15 (goto-char (point-min)) | |
495 | 16 (fix-dls) |
17 (goto-char (point-min)) | |
18 (insert-file "/home/ht/Documents/RSoF/MHMC/doc-head.ent") | |
19 (goto-char (point-max)) | |
20 (forward-line -2) | |
21 (beginning-of-line) | |
22 (insert "</div>\n") | |
23 (forward-line 1) | |
24 (beginning-of-line) | |
25 (kill-line) | |
26 (insert "</doc>") | |
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 | 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 | 34 |
35 (defun fix-dls () | |
36 (interactive) | |
37 (replace-string "dl>" "list>") | |
38 (goto-char (point-min)) | |
39 (replace-regexp "<dt>\\([^<]*\\)</dt>\n" "<item term='\\1'>") | |
40 (goto-char (point-min)) | |
41 (replace-string "<dd>\n" "") | |
42 (goto-char (point-min)) | |
43 (replace-string "</dd>" "</item>") | |
44 ) | |
45 (defun fix-divs () | |
46 (interactive) | |
47 (replace-regexp "^<h.[^>]*>\\([^<]*\\)</h.>" "<div>\n <title>\\1</title>") | |
48 (goto-char (point-min)) | |
548 | 49 (replace-regexp "\\(</p>\n\\)\\([ ]*\\)\\(<div\\)" "\\1\\2</div>\n\\2\\3") |
495 | 50 (goto-char (point-min)) |
51 (replace-string "<p>ACTION: " "<p class='a'>") | |
52 (goto-char (point-min))) |