File tree 4 files changed +295
-239
lines changed
4 files changed +295
-239
lines changed Original file line number Diff line number Diff line change
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
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 5
5
6
6
[ Section 1] ( ?part=part1 )
7
7
[ Section 2] ( ?part=part2 )
8
+ [ Section 3] ( ?part=part3 )
8
9
<div class =" clearfix " > </div >
9
10
[ Contents] ( ?part=contents )
You can’t perform that action at this time.
0 commit comments