From Ivan Vilata i Balaguer to ~lioploum/offpunk-devel
Ploum (2023-06-07 20:39:02 +0000) wrote: > I’ve found this very interesting article about how to use command-line > tool from within a python script. > > https://martinheinz.dev/blog/98 > > The recommended approach is to use the "sh" python module, something I > didn’t know. […] Umm, the article has interesting references and `sh` looks handy, but I wouldn't say that it's the "right" way of running shell commands, as the article author puts it. It does provide some syntactic sugar and execution logging (I don't know how context managers like `sudo` affect the other
From Ivan Vilata i Balaguer to ~lioploum/offpunk-devel
Sotiris Papatheodorou (2023-01-20 16:27:34 +0200) wrote: > I'm looking into implementing an offpunk-compatible page cache for my Gemini > client for old Kindles and paid some more attention to the offpunk cache > format. From my understanding the current cache paths look like this: > > <scheme>/<hostname>/<path split on slashes>/<query split on slashes> > > i.e. gemini://kennedy.gemi.dev:1966/search?foo/bar becomes > gemini/kennedy.gemi.dev/search/foo/bar > > […] A first proposal, assuming a UNIX-like filesystem where all characters apart > from slash (/) and null (0x00) are allowed in filenames (this is a big > assumption, ignores shell meta-characters, won't work on Windows etc.):