💾 Archived View for senders.io › gemlog › 2023-04-11-facilitating-posting.gmi captured on 2024-08-25 at 00:32:58. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-04-19)

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

Facilitating Posting

Right now, to post to gemini, I have to:

1. write the gemlog

2. scp the file to my server

3. ssh into my server

4. edit my gemlog index file

5. run my rss feed regeneration+publish to antenna

Now I've written a script to do this!

And honestly? That's literally the post!

The code

So I've pushed the code to my git server:

https://git.senders.io/utils/gempost

If it wasn't clear before I'm a software engineer, it is now - given this overbuilt and probably actually quite brittle solution.

Invisible parts

A bit of logic gets hidden away in the "remote post process" which is the SSH command I send to my server to publish the atom feed and publish to antenna. This is done by:

cd /path/to/gemini; ./feed.sh

Which triggers:

python3 gemfeed.py \
	--mtime
	..args
	-t "Senders' Gemlog"
/bollux -q "gemini://warmedal.se/~antenna/submit?gemini://senders.io/feed/atom.xml" > /dev/null

I am using bollux effectively as a "curl" since it was a bash only gemini browser and it supported this just fine! Without the > /dev/null it would try and be somewhat interactive - so this disabled that (there isn't any hanging process or nothing). Though it's not ideal AT ALL - and it throws some warnings that like - eventually this is gonna cause some issue. Is there a more canonical "curl" for gemini? I only need to post to antenna.

The process in whole

So now I write up a gemlog (like this one) then just run:

./gempost.sh ~/Docs/gemini/2023-04-11-facilitating-posting.gmi "2023-04-11 - Facilitating Posting"

And that's it! it's wonderful (I have to type my ssh key passphrase a few times - but that's w.e). I'll likely get this running on my writing PC too!

I did mess around with remote editing files in Emacs, which is great and I do that to correct stuff, or modify non-gemlog things. But unless I was one-shot writing these gemlogs, it just wasn't feasible. And with my writing PC's awful wifyi - I actually prefer entirely local changes.

Conclusion

This has actually made me think about some things though. My file and naming convention was something I managed in the scp - taking the file "facilitating-posting.gmi" and in my scp renaming it with the publish date. That is no longer something I want to deal with, so I may just scrap that whole convention all together and just rely on the file dates, and the publish dates in the index.gmi file? We'll see - renaming a file before publishing is a minor task especially since I'm in the shell anyway.

Links

https://tildegit.org/acdw/bollux

gemlog

home