about summary refs log tree commit diff stats
path: root/gemtohtm
diff options
context:
space:
mode:
authorFulton Browne <git@fulton.software>2021-05-28 03:10:01 +0000
committerFulton Browne <git@fulton.software>2021-05-28 03:10:01 +0000
commit6ad3da3f46c45620da55bee9dc659f6888181572 (patch)
tree8e220c9b00ef10d26e06e7c3f960dedf939eaecc /gemtohtm
parent8e1c7b9f16acdb8a6b36c79ccd029b63ad520843 (diff)
downloadg9srv-6ad3da3f46c45620da55bee9dc659f6888181572.tar.gz
added a gemtext to html converter
Diffstat (limited to 'gemtohtm')
-rw-r--r--gemtohtm5
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 }