Skip to content

Commit 836f901

Browse files
committed
Finished moving remaining parts of class3 to markdown
1 parent f6e99f1 commit 836f901

File tree

4 files changed

+295
-239
lines changed

4 files changed

+295
-239
lines changed

sedscr

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# A quick and dirty sed script to convert HTML slides for reveal to markdown
2+
# Usage:
3+
# sed -f sedscr filename.html > filename.md
4+
/^ *$/d
5+
/<section>/d
6+
s/.*<\/section>/@@@\n\n/g
7+
s/.*<!--/Note: /
8+
s/-->//
9+
s/.*<h1>/#/
10+
s/<\/h1>/\n/
11+
s/.*<h2>/##/
12+
s/<\/h2>/\n/
13+
s/.*<h3>/###/
14+
s/<\/h3>/\n/
15+
s/.*<li>/* /
16+
s/<\/li>/\n/
17+
s/<ul>//
18+
s/<\/ul>//
19+
s/<ol>//
20+
s/<\/ol>//
21+
s/.*<p[^>]*>//g
22+
s/<\/p>/\n/
23+
s/.*<code[^>]*.*python.*>/```python/
24+
s/.*<\/code><\/pre>/```/
25+
/.*<a href="[^"]*".*>.*<\/a>/{
26+
s/<a href="/[/
27+
s/">/](/
28+
s/<\/a>/)/
29+
s/\[\(.*\)\]\((.*)\)/[\2\]\(\1\)/
30+
s/\[(/[/
31+
s/)\]/]/
32+
}

set2/class3.html

-239
This file was deleted.

set2/slides/menu.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55

66
[Section 1](?part=part1)
77
[Section 2](?part=part2)
8+
[Section 3](?part=part3)
89
<div class="clearfix"> </div>
910
[Contents](?part=contents)

0 commit comments

Comments
 (0)