diff options
author | Fulton Browne <git@fulton.software> | 2021-05-28 03:10:01 +0000 |
---|---|---|
committer | Fulton Browne <git@fulton.software> | 2021-05-28 03:10:01 +0000 |
commit | 6ad3da3f46c45620da55bee9dc659f6888181572 (patch) | |
tree | 8e220c9b00ef10d26e06e7c3f960dedf939eaecc | |
parent | 8e1c7b9f16acdb8a6b36c79ccd029b63ad520843 (diff) | |
download | g9srv-6ad3da3f46c45620da55bee9dc659f6888181572.tar.gz |
added a gemtext to html converter
-rw-r--r-- | gemtohtm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gemtohtm b/gemtohtm new file mode 100644 index 0000000..0f0d038 --- /dev/null +++ b/gemtohtm @@ -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 } |