From e2baa089b2804d10074262a84260914bfe3d8590 Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Sun, 12 Apr 2020 19:31:16 +1200 Subject: [PATCH] Research how to implement additional protocols. --- ISSUES/new-protocols.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 ISSUES/new-protocols.md diff --git a/ISSUES/new-protocols.md b/ISSUES/new-protocols.md new file mode 100644 index 0000000..0c521e1 --- /dev/null +++ b/ISSUES/new-protocols.md @@ -0,0 +1,32 @@ +# Support additional protocols +As mentioned in the README, I'd add like to add support for more URI schemes to +HURL. Here I'll list how I might implement them: + +## ftp(s): +Network.FTP.Conduit.createSource looked convenient, but will likely be +incompatible with dependency versions. + +Network.FTP.Client.retr, .withFTP(S), & possibly .login looks almost as easy. + +## magnet: +There's a `bittorrent` package, but it appears to be unmaintained and not up to +scratch for my needs. + +## gemini: +The Network.Connection module allows me to open a TLS connection, write a line +from it, and read a line from it. + +mWhile (connectionWaitForInput -1) connectionGetChunk should read the full file. + +May want to parse response header (after converter to UTF-8) via uncons & strip. + +Since the protocol takes a URL and returns a mimetype, error code, & data it +should fit right in. And it's markdown looks trivial to parse into HTML the +rest of Rhapsode can handle. It should slot right in! + +## gopher: +Would need more conversion effort, to extract from the URL and convert them to +MIMEtypes. And if we want decent audio output, those would need to be parsed +according to sometimes undefined standards. + +But should be easily implementable using the same APIs as for Gemini! -- 2.30.2