Follow

I'm sure there's a million things wrong with this but I'm going to implement it on my server for uploading Gemini content instead of using ssh/sftp in Termux all the time: codeberg.org/oppenlab/iapetus It's similar to Titan by @kensanata but I think it sticks closer to the protocol (in fact it came together just now while attempting to implement Titan locally with node.js for the server and Ariane 4 running on an Android emu)

@oppen hm. So you’re always relying on file name extension to determine mime type? That was something I wanted to avoid, but perhaps I was wrong.

@kensanata in practice I'll be uploading .gmi and images, maybe mp3s all from a phone. Just daily posts, I've got a plan for a Twitter/Mastodon style posting UI as well as a more involved editor with Gemtext highlighting.

@oppen I’ll see whether I can cobble up an implementation that works with Phoebe, my wiki engine.

@kensanata I got a little lost with Titan, could you maybe add a client/server flow like in the Gemini Protocol docs to your pages? I'd still like to implement that too.

@oppen I noticed Iapetus uses 10 Continue and 20 Success in a strange way. How about replacing "10 Continue\r\n" with "21 text/plain\r\nPlease continue\n" (a new status code if you must, but why not just use 20?) and "20 Success\r\n" with "22 text/plain\r\nSuccess\n" (again, or a regular code 20)

@kensanata let me think about it. The idea was it mirrored Geminis input response code, and I wanted a different code for each stage so there's no state to manage in the clients, but two 2X would manage that too.

@oppen

Hi!

> I'm sure there's a million things wrong with this but I'm going to
> implement it on my server for uploading Gemini content instead of
> using ssh/sftp in Termux all the time:

As a gemini user and client author i think a protocol for file
uploading (or editing, maybe?) would be necessary, so far i am aware
of at least 3 different protocols (yours, titan and inimeg). I wonder
if would be a good idea to coordinates all the efforts (i am thinking
of a mailing list, codeberg or both) and write something with a larger
consensus.

Bye!
C.

@cage not heard of inimeg! I'll have a look, as for coordinating if the mailing list is anything to go by that's maybe impossible!

@cage inimeg looks practially identical to Iapetus though, only a couple of small semantic differences, but the flow is identical from a quick look. One thing it's missing is a payload size which I think is important to prevent the server hanging with an open socket.

@oppen

Hi!

> One thing it's missing is a payload size which I think is important
> to prevent the server hanging with an open socket.

Genuine question: would not, the size, become a way to extend the
protocol (thinking about a cookie-like mechanism)?

Bye!
C.

@cage no. It's just the client informing the server how many bytes to expect for the file upload.

@oppen
>
> @cage [1] no. It's just the client informing the server how many bytes to expect for the file upload.

OK Thanks! I need to decide which protocol i am going to implement in
my client, i like inimeg because is more flexible and allow for
mime-type filtering (the server propose which mime types could be
accepted or not, for each URI), but your is much simpler to implement
and safer for the server; thanks for answering my questions, now i
have some more information to take a decision. :)


Bye!
C.

@cage implement all 3! I was already going to do Titan as well in the Ariane upload area and will do inimeg now as well.

@oppen
>
> @cage [1] implement all 3!

That would be the best solution for sure! 😊

> I was already going to do Titan as well in the Ariane upload area and will do inimeg now as well.

Great!! I am happy to let you know about inimeg! :)

Bye!
C.
Sign in to participate in the conversation
Merveilles

Merveilles is a community project aimed at the establishment of new ways of speaking, seeing and organizing information — A culture that seeks augmentation through the arts of engineering and design. A warm welcome to any like-minded people who feel these ideals resonate with them.