mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-20 10:05:49 +00:00
28 lines
611 B
Bash
Executable file
28 lines
611 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Tries to do the low-hanging fruit for v1 html to v2 rst.
|
|
|
|
cat "$@" \
|
|
| sed \
|
|
-e 's:<p>::g' \
|
|
-e 's:</p>::g' \
|
|
-e 's:<p/>::g' \
|
|
-e 's:<b>:**:g' \
|
|
-e 's:</b>:**:g' \
|
|
-e 's:<i>:*:g' \
|
|
-e 's:</i>:*:g' \
|
|
-e 's:<code>:``:g' \
|
|
-e 's:</code>:``:g' \
|
|
-e 's:<li>:* :g' \
|
|
-e 's:<li/>:* :g' \
|
|
-e 's:</li>::g' \
|
|
-e "s:’:':g" \
|
|
-e 's:“:":g' \
|
|
-e 's:”:":g' \
|
|
-e 's:—:--:g' \
|
|
-e 's:>:>:g' \
|
|
-e 's:<:<:g' \
|
|
| grep -v '<ul>' \
|
|
| grep -v '</ul>' \
|
|
| grep -v '^<button' \
|
|
| grep -v 'body_section_toggle'
|