markdown tools
This commit is contained in:
32
reporting/md-color
Executable file
32
reporting/md-color
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
function helpexit() {
|
||||
echo "Colorify a markdown document"
|
||||
echo "Give filename(s) as the argument"
|
||||
echo " Depends on highbeam "
|
||||
exit
|
||||
}
|
||||
[[ -z "$1" ]] && helpexit
|
||||
[[ "$1" = "-h" ]] && helpexit
|
||||
|
||||
export HB_RULES='"^\s*\*.*" "$y" \
|
||||
"^[[:space:]]*[0-9]\+\..*" "$y" \
|
||||
"^#.*" "$W" \
|
||||
"^\s\s\s\s[^\*0-9].*" "$c" \
|
||||
"\`[^[[:space:]]]*[^\`]\+\`" "$c" \
|
||||
"\[[^]]\+\]([^)]\+)" "$B" \
|
||||
"\*[^[[:space:]]]*[^\*]\+\*" "$H" \
|
||||
"_[^[[:space:]]]*[^\_]\+_" "$H" \
|
||||
"<[^>]\+>" "$K" \
|
||||
'
|
||||
|
||||
# * bullets
|
||||
# 1. ordered list
|
||||
# ## Headers
|
||||
# code block
|
||||
# code inline
|
||||
# [links](URL)
|
||||
# *bold*
|
||||
# _bold_
|
||||
# <> tags
|
||||
cat "$@" | highbeam
|
||||
|
||||
Reference in New Issue
Block a user