mirror of
https://github.com/johnkerl/miller.git
synced 2026-01-23 18:25:45 +00:00
38 lines
825 B
Bash
Executable file
38 lines
825 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:<tt>:``:g' \
|
|
-e 's:</tt>:``: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' \
|
|
-e 's:<:<:g' \
|
|
-e 's:<span class="boldmaroon">:**:g' \
|
|
-e 's:</span>:**:g' \
|
|
| h1foo \
|
|
| h2foo \
|
|
| pokifoo \
|
|
| sed 's/^ *//' \
|
|
| grep -v '<ul>' \
|
|
| grep -v '</ul>' \
|
|
| grep -v '^<button' \
|
|
| grep -v 'body_section_toggle' \
|
|
| scrunch
|