summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/leda.ml23
1 files changed, 7 insertions, 16 deletions
diff --git a/bin/leda.ml b/bin/leda.ml
index 07fe43c..40074ff 100644
--- a/bin/leda.ml
+++ b/bin/leda.ml
@@ -1,20 +1,11 @@
module M = Gemini.MimeTextGemini.MimeTextGemini
-let test_gemini = "=> /blah mylink\r\n\
- => /blah\r\n\
- ```\r\n\
- preformatted 1\r\n\
- preformatted 2\r\n\
- ``` ending preformatted text\r\n\
- some text\r\n\
- more text\r\n\
- \r\n\
- * unordered list\r\n"
-
-let _ = print_endline test_gemini
-
-let _ = print_endline "\n\n...gets parsed as...\n\n"
-
let test_parse s = M.gemini_to_canon_str (M.str_to_gemini s)
-let main = print_endline (test_parse test_gemini)
+module T = Gemini.MimeType.MimeType
+module R = Gemini.Request.GeminiTransaction(T)
+
+let main =
+ match R.request "gemini://gemini.circumlunar.space/\r\n" with
+ | Some (_, _, s) -> print_endline s
+ | _ -> print_endline "oops"