Mercurial > hg > rsof
annotate MHMC/minutes.el @ 542:53a504a7c31b
with results
author | Henry Thompson <ht@markup.co.uk> |
---|---|
date | Wed, 18 Sep 2024 09:33:55 +0100 |
parents | 6b7198aed717 |
children | 5def9134830d |
rev | line source |
---|---|
533 | 1 ;;; /c/Program\ Files/Pandoc/pandoc --metadata title="MHMC 2024-07-02" -N -f markdown -t html4 > notes.html |
2 ;;; Use -s if you want to just see the pandoc html as such, e.g. for an agenda to be emailed verbatim | |
495 | 3 |
4 (defun fix-html () | |
5 (interactive) | |
6 (goto-char (point-min)) | |
7 (forward-line 2) | |
8 (sgml-forward-element) | |
9 (forward-char 1) | |
10 (kill-region (point-min) (point)) | |
11 (fix-dls) | |
12 (goto-char (point-min)) | |
13 (insert-file "/home/ht/Documents/RSoF/MHMC/doc-head.ent") | |
14 (goto-char (point-max)) | |
15 (forward-line -2) | |
16 (beginning-of-line) | |
17 (insert "</div>\n") | |
18 (forward-line 1) | |
19 (beginning-of-line) | |
20 (kill-line) | |
21 (insert "</doc>") | |
22 (goto-char (point-min)) | |
496
34129b221ffa
_ for italic, ** or __ for bold
Henry Thompson <ht@markup.co.uk>
parents:
495
diff
changeset
|
23 (replace-string "em>" "emph>") |
34129b221ffa
_ for italic, ** or __ for bold
Henry Thompson <ht@markup.co.uk>
parents:
495
diff
changeset
|
24 (goto-char (point-min)) |
34129b221ffa
_ for italic, ** or __ for bold
Henry Thompson <ht@markup.co.uk>
parents:
495
diff
changeset
|
25 (replace-string "strong>" "name>") |
34129b221ffa
_ for italic, ** or __ for bold
Henry Thompson <ht@markup.co.uk>
parents:
495
diff
changeset
|
26 (goto-char (point-min)) |
533 | 27 (let* ((hb (search-forward "<title>" nil t)) |
28 (tb (search-forward "<title>" nil t)) | |
29 (te (- (search-forward "</title>") 8)) | |
30 (tt (buffer-substring tb te))) | |
31 (goto-char hb) | |
32 (insert tt)) | |
33 (search-forward "<div id=\"header\"" nil t) | |
34 (beginning-of-line) | |
35 (kill-line) | |
36 (forward-line 2) | |
37 (kill-line 2) | |
496
34129b221ffa
_ for italic, ** or __ for bold
Henry Thompson <ht@markup.co.uk>
parents:
495
diff
changeset
|
38 1) |
495 | 39 |
40 (defun fix-dls () | |
41 (interactive) | |
42 (replace-string "dl>" "list>") | |
43 (goto-char (point-min)) | |
44 (replace-regexp "<dt>\\([^<]*\\)</dt>\n" "<item term='\\1'>") | |
45 (goto-char (point-min)) | |
46 (replace-string "<dd>\n" "") | |
47 (goto-char (point-min)) | |
48 (replace-string "</dd>" "</item>") | |
49 ) | |
50 (defun fix-divs () | |
51 (interactive) | |
533 | 52 (let ((top (point))) |
53 (replace-string "<h1 " "</div> | |
495 | 54 (replace-regexp "^<h.[^>]*>\\([^<]*\\)</h.>" "<div>\n <title>\\1</title>") |
55 (goto-char (point-min)) | |
533 | 56 (replace-regexp "\\(</\\(p\\|\\title\\)>\n\\)\\([ ]*\\)\\(<div\\)" "\\1\\3</div>\n\\3\\4") |
495 | 57 (goto-char (point-min)) |
58 (replace-string "<p>ACTION: " "<p class='a'>") | |
59 (goto-char (point-min))) |