💾 Archived View for gemini.djph.net › users › gemini captured on 2024-05-26 at 14:31:12. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2020-09-24)

-=-=-=-=-=-=-

It works!

Heard about the 'gemini' project last week (2020-07-10, or thereabouts), and it certainly seems to be a project that aligns with my own taste for an "online" presence that isn't plagued with all the mess that the general web has become. Hopefully I can remember to keep this mostly active (unlike my website).

When publishing things for download / sharing, I tend to sign them with PGP. My key is available on public keyservers, such as MIT, Ubuntu, etc, or you can grab it from here:

PGP Key

Editor

I use vim on Devuan Ascii, with a "standard" break at seventy-two (72) characters, or thereabouts. The *gmi files are processed by script before uploading, so should get reflowed to whatever your browser's width is, but I haven't tested much beyond proving the processor does in fact generate paragraphs of inordinately long lines.

If your browser isn't reflowing things as you would expect, let me know, maybe it's an easy fix over here. With my luck, it'll be over here, but not easy.

Links

Project Repository

Processing

Files are written in vim as textfiles, then run through a small shell script utilizing sed to remove the "extra(tm)" line feeds, then rsyncs that output to the server itself.

The sed portion of the script is as follows (egregiously lifted from stack overflow):

sed -e ':a;N;$!ba;s/\n\([:alnum:]\)/ \1/g' < "$f" > "${f%%.txt}.gmi"

The first bit of the script ":a;N;$!ba;" is a series of additional parameters used as preprocessing directives before invoking the actual

'switch' sequence. Assuming I've pieced it together properly:

So, ASSUMING I'm understanding this preprocessor properly, we're turning the document from a 72-character-per line file to a single-lined file with "\n" characters strewn in anywhere vim would've wrapped. This now single-line stream is sent into the 's' command, which starts replacing the sequence "\n\([[:alnum:]]\)" with the sequence " \1". That is, it replaces a newline character followed by an alpha-numeric character (0-9 or A-z, inclusive) with a space followed by that character. For example, in this sentence the word "example" is on a newline in my editor. When being processed by the sed script, it is seen as the character sequence "\ne", and replaced with the sequence " e". At some point, I'll probably get caught out with needing some other characters.

Full script

script sha-256 checksum

signature

Contact me

dan@djph.net