still need to eyeball the results but it looks like most lines that are ALL CAPS are level 3 headers or lower, so this converts everything to level 3. a human effort will identify the level 4s and beyond I think Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
13 lines
676 B
Bash
Executable File
13 lines
676 B
Bash
Executable File
#!/bin/sh
|
|
# The source seems to use level 3 headers in ALL CAPS, so make those markdown level
|
|
# 3 headers, noting that some parts seem to put things intending to be level 4 in
|
|
# ALL CAPS too, so this will need some human post processing
|
|
|
|
# clean up some typos and similar
|
|
sed -E 's/ACTION: Activate a Special Ability/ACTION: ACTIVATE A SPECIAL ABILITY/' _tmp/ccsrd.md > _tmp/ccsrd.new.md
|
|
sed -E 's/FIFTH-TIER SKILLS ANd KNOWLEDGE ABILITIES/FIFTH-TIER SKILLS AND KNOWLEDGE ABILITIES/' -i _tmp/ccsrd.new.md
|
|
sed -E 's/FANTASy/FANTASY/' -i _tmp/ccsrd.new.md
|
|
|
|
# s is here because e.g. "NPCs" is a common occurrence
|
|
sed -E "s/^[A-Z0-9s ()@'?&.,:\/-]+$/### \0/" -i _tmp/ccsrd.new.md
|