How to edit pages on this wiki

If you want to edit a page or leave a comment on the wiki without a web browser, you can do so via the Gemini and Titan protocol.

This rest of this page lists discusses the various options: Perl scripts, Bash scripts, Emacs, using OpenSSL? directly… 😅

Whenever you upload a page, you’ll need a “token”. The token for this wiki is “hello”.

Command Line

Here’s option that make it as simple as copying a file on the command line: get the gemini (for download) and titan (for upload) scripts from the Gemini Wiki repository and install them in your PATH somewhere, such as ~/.local/bin. Both are written using Perl 5.

Once you have these two installed, here’s how to edit a page:

Use gemini to download the Gemtext using the raw URL:

gemini gemini://communitywiki.org/wiki/raw/Gemini_Test > testing.txt

Make some changes using your favourite text editor and upload it again:

titan --url=titan://communitywiki.org/wiki/raw/Gemini_Test --token=hello testing.txt

If you’re a developer and would like to learn more about the Titan protocol used to edit pages on this wiki, there’s more information on the Titan page.

Emacs

Alternatively, if you’re into Emacs, you can use Elpher and some glue code to edit pages.

OpenSSL

Here’s how to do an upload using openssl directly:

echo "titan://communitywiki.org/raw/Gemini_Test;mime=text/plain;size="`wc --bytes < test.txt`";token=hello" \
  | cat - test.txt | openssl s_client --quiet --connect communitywiki.org:1965 2>/dev/null

In short, the URL must contain three parameters:

Bash

This repository defines gemini and titan as two Bash functions.

As you can see from the examples, the argument handling is a bit different that how the Perl scripts linked to above handle it. I don’t think I’ll continue to maintain these shell functions. If you’re into Bash, please take over! 😃

Define external redirect: OpenSSL

Languages: