Second Shell Script - Autolog
I joined Cosmic Voyage a while back. I really love the system there for updating you ship’s posts. You type ’log’ at the command line and you are presented with a series of options for logging your entry.
This morning, I decided to try out something similar for logging gemini posts.
I did look at the script for the Cosmic Voyage log command, but it was a bit too complicated for me (!).
So, I tried to just put together something as simply as I could (I am still so new to the shell and I have no technical experience outside of linux).
The script just:
asks for a title, appends that title to the gemlog index,
then, asks for a ‘commit’ message, appends that to my nanolog file
finally, asks for a ’tag’, and adds the post to the tag page.
It seems to work okay. It was really useful learning how to search for a string with sed, and then add the entry to the next line.
Still to do:
Better user feedback, but the ‘interactive’ aspects of shell script still seemed too advanced for me
At the moment it searches for a ‘month’ string in the gemlog index, and then adds the post below that. So, I have to manually add the ‘month’ title to the index (e.g., have to add ‘April’ before I can post the first April post). It would be great if it could automatically do that if it was missing, and even if it could sort the posts into month/year directories. I did find someone who did something like that with their gemini capsule, but I haven’t figured out how to integrate it yet:
- In general, I have to make it more ‘flexible’. I’m not sure how it handles incorrect input, etc.
Anyway, here is the script if anyone’s interested: