-- Leo's gemini proxy

-- Connecting to tilde.team:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini; lang=en

A Publishing Script

Its coming up on a year now that I have been writing gemini stuff on pubnix through the terminal emulator. I have come a long way since the birth of my capsule and have learned much about various aspects of having a site.


Today I realized how exhausted I was with my current writing process and a lightbulb went on in my head. Why not use scripts to make my life easier and save me some repetitive stress injury. Y'know, the exact thing they were meant to do.



Manual Process:

1. open terminal emulator

2. SSH into tilde.team

3. cd public_gemini/logs/

4. vim $YYYY-MM-DD-$title.gmi

5. write log, :x

6. vim index.gmi

7. manually enter link to log, :x

8. Open lagrange and click on bookmark to antenna submission URL


Automated Process:

1. open terminal emulator

2. make shorthand alias to cd into documents/gemini-input/ && vim temp.gmi

3. write article, :x

4. Run bash script that:


takes the temp.gmi in gemini input

auto formats the title

uploads to tilde.team server in the logs/ section

appends index.gmi in logs/ to include link to log

clears gemini-input/


Draft Of Script:

#!/bin/bash
$DATE='$YYYY-MM-DD'
mv /home/light/Documents/gemini-input/*.gmi ... $DATE.gmi
ssh tilde.team scp $log.gmi tilde.team:~/public_gemini/logs/$log.gmi
ssh tilde.team [command that paste '=> $log.gmi into correct spot]
rm /home/light/Documents/gemini-input/*

Obviously need make slightly more complex changes to include user input to name the title and such, but for now its a very rough start..


Web Mirror

The next step, if or when I can even get this far, is to mirror my logs to my tilde.team website (which doesn't currently exist but totally could!).


Doing this would involve a much more complex affair of re-learning about HTML and how to format gemtext into HTML markdown. I am sure that there are many who have already done this and made scripts for it, but it is a learning experience to try and make my own from scratch which I find has become valuable.


Too!

I would also like a spartan mirror. At that point my main concern is having three copies of the same data sitting on tilde.team server. Albiet the capsule only weights at most a few MBs which is far below my quota limit. In todays terms a few MBs is nothing, and nothing times 3 is still nothing. But I don't want multiple copies of more memory intensive stuff like photos or audio.


Hacker Mentality

Anyone can copy and paste a program and call it a day, but actually siting down and working on your own is far more rewarding especially when it all finally works as it should. A big part of self sufficency is learning about how things work and using that knowledge to build useful systems.

back to Logs

-- Response ended

-- Page fetched on Wed May 22 02:49:39 2024