💾 Archived View for text.adventuregameclub.com › tech › gemfeed-world-readable.gmi captured on 2023-07-10 at 13:20:42. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-03-01)
-=-=-=-=-=-=-
Gemfeed has a useful function where it checks if a file is world readable (rrr permissions for user, group, and other I guess). I thought this was pretty clever because you can just work on a file in place and then change it's permissions when ready to publish.
I knew about *nix filepermissions, but I hadn't really bothered with them much. All the files I was writing were ending up with other +read permissions by default, so I had to change that; at least for the folder where I save artiles.
Turns out, you can set the file perms for new files created within a directory with the setfacl command:
setfacl -dRm u::rwx,g::rwx,o::--x dummy_dir/
I wanted to be able to write some articles, save them into some directories, and quickly generate a gemsite. And I didn't want to have to have some weird yaml headers like Jekyll does for html sites.
I tried `kiln`, which was pretty close to what I was looking for, but not quite. So I figured I was going to have to write my own script.
I didn't know anything about atom feeds, so I took a look at Solderpunk's gemfeed and found someone had already put in a pull request to make it search subdirectories, which was something I was very much interested in.
The pull request was broken, but I fixed it and then I had a good chunk of the work finished already. Just needed to script setting up the files.
There were same handy functions in gemfeed that I could use, so that saved some time. One that caught my interest, was the is_world_readable function. And now you know the full story
_______________ < $ fortune -os > --------------- \ \ .--. |o_o | |:_/ | // \ \ (| | ) /'\_ _/`\ \___)=(___/
✍️ Last Updated: 2021-06-09