rendered paste body#!/bin/sed -f
x
/./b notfirst
x
1i\
++ Characteristics
b first
: notfirst
x
: first
1,/[dD]escription\|^[^: ]\+$/{
/[dD]escription/{
s/^.*$/\n++ Description/
b done
}
/^[^: ]\+$/{
i\
\
++ Description
b done
}
/ffecting\|esisting/{
s/str/[[[strength]]]/i
s/agi/[[[agility]]]/i
s/con/[[[constitution]]]/i
s/dex/[[[dexterity]]]/i
s/int/[[[intelligence]]]/i
s/wis/[[[wisdom]]]/i
s/cha/[[[charisma]]]/i
s/per/[[[perception]]]/i
}
s/\t/ /g
s/ \{8,\}/\n/
s/^\(.*:.*\)/[[[\1/
s/: */]]]: /
s/^ *$//
/./P
{
x
s/^.*$/./
x
}
D
}
: done
$a\
\
++ Notes