Progressive Enhancements in Gemini
Being on Gemini is a breath of fresh air. However, there are some modern niceties like icons and visuals that the modern web offers which gemini doesn't. Or maybe, we are not looking deep enough.
ascii art
It surprises me that a lot of capsuleers have managed to get radio streams working on their capsule sites and don't get me wrong. The ascii art is great and all but it would be a pain to make by hand or necessitates bash scripting some kind of jp2ascii script that makes it a technical choice.
Emojis and devicons
I would like to explore the idea of progressive enhancements. Something like installing devicons/nerdfonts to the terminal. Granted, it would hurt a lot of the gui browsers that currently exists today in the ecosystem and breaks away from the pure plaintext folks that lurk in these corners. But let's say you want to do commerce on gemini, wouldn't it be a delight if your customers can see your ebay link with the ebay devicon? Maybe not. But then isn't the gemini community gate-keeping with its undeclared preferences?
A lot can be said that devicons still don't necessarily render that well in terminal browsers. Since they are inlaid in text, the font sizes constrict how prominently they can be displayed and so logos with text within them are siloed in their monospace prisons. This gives way to the notion that capsules must have a preferred zoom ratio if they want to be viewed for the author intent. This goes something against the spirit of this platform since the content should be the text and the natural language medium that facilitates the message. But something like the electron logo would be a useful for education purposes.
Not to mention, there's a whole host of weather icons that go along with emojis. I've been looking into creating spinner using the phases of the moon to do this . But perhaps emojis might be a better fallback mechanism for visualization that is a bit more universal 🌘🌗🌖🌕🌔🌗🌒
It certainly begins with education. Starting a child with an internet browser comes off as a little uncouth and obscene. But it has all the niceties to keep yougnlings distracted with their infinite mana pool of energy. But something like gemini protocol might benefit from making neat spaces that explore simple web concepts so that the foundation of communication can be established like TLS handshakes and parsing before we make gzip compression a feature of the internet and force a 1GB javascript binary down people's throats.
Many people who use linux view it as a linux journey and that is how I feel about my current state of gemini capsuling. I will be a forever newb. I have yet to write my own bash script to parse new gmi files and link it automatically to my index page because I am not yet sure what kind of structure I would like to maintain going forward.
Plus, bash scripts are known to be unmaintainable in the long run almost like json api schemas unless you are deep into them. I would consider making a nushell script going forward for managing my capsules. My current aversion to hosting my own gemini capsules is the fact that it doesn't make sense given my current internet bandwidth shared in the household to serve to the broader public despite gemini protocol reducing the barriers on that end. At least envs.net solves that problem for me but it creates another problem for me that I would only have gemini content here and it would require legwork for me to parse markdown notes to gemini.
Markdown or Gemtext💎 and the primordial source soup? What is the δ?
The true conflict is that while gemtext is a far more simpler format than markdown, then my natural inclination should be that I write everything in gemtext and have to write a parser that goes the other direction. And this could be done quite elegantly given the markdown footnote feature:
# markdown note
This is something that requires a [reference][^1]
[^1]: gemini://envs.net/~jisifu
which has more or less the same layout structure as
# this is a gemtext
This is something that requires a reference
=> gemini://envs.net/~jisifu Reference
Obviously, there are challenges to this approach since the footnote is out of context and it requires that the reader is engaged enough to infer from the gemtext whereas markdown signals to the reader with a link as an accessibility tool along with inline text.
Jp2a
So one way to kind of test portability is visualization. In many markdown renderers, you get the image linked and rendered out of hte box. Thsi is useful for note taking when you want to reference shapes and figures and don't want it defined by svg primitives. Doing so in preformatted text or ascii can be a chore but it is possible with the help of some programs like jp2a that can automate it. But I wouldn't say that they are the examplars of visual automation.
Installing jp2a is pretty simple on envs.net. You can make from source and follow the instructions on the github page:
git clone https://github.com/cslarsen/jp2a;
cd jp2a;
autoreconf -vi
./configure --with-jpeg-prefix=/usr/local \
--with-curl-config=`which curl-config`
make -j
Although, doing graphical image processing on envs.net would be a chore as well requiring installing on local magick and all of these tools that one would think would be available in shared user space, but I digress. Indeed, envs.net is just a hosting environment and being good stewards of this community and shared resources, it's not for us to abuse the computing resources. But I just thought jp2a being a measily 1 MB file wouldn't hurt the host even if every user installs a copy.
But I'm just saying, if you're running debian, then the concept is shared user space in shared libraries all borging together like borgs.
Running `man jp2a` lists a few options. I have played with this tool before and it does a reasonable job at even outputting html and dialing the color and resolutions. I haven't gotten around to good sensible default flags as I would imagine it varies for different users and the dependent on the light/dark background of the image themselves. But assuming 80 character monospace width would be something I think is reasonable for terminals and gui browsers alike?
I generally run a half vertical screen with my terminal browsers so something like:
jp2a /<path>/<to>/image.jpg --size=72x<ratio height>
Should do the trick although I don't like how the program doesn't give me the native image resolution out of the box and makes scripting a chore since I would need to fetch more dependencies.
All of this to say that I won't be automating gemtext ascii art into my workflow unless I perform it locally, which I am not fully convinced of.
I am most likely not using jp2a extensively as the ansi escape sequence doesn't translate across so you won't get some of the dynamic effects like blinking cursor or rendering color on the terminal a la gemini. Although, I'm sure there is a way still...