added a gemtext to html converter

This commit is contained in:
Fulton Browne 2021-05-28 03:10:01 +00:00
parent 8e1c7b9f16
commit 6ad3da3f46
1 changed files with 5 additions and 0 deletions

5
gemtohtm Normal file
View File

@ -0,0 +1,5 @@
$1 == "#" { print "<h1>", $0, "</h1>"; next}
$1 == "##" { print "<h2>", $0, "</h2>"; next}
$1 == "###" { print "<h3>", $0, "</h3>"; next}
$1 == "=>" { print "<a href=\"", $2, "\">" substr($0,index($0,$3)), "</a>"; next}
{ print }