[-] myxi@toast.ooo 2 points 5 hours ago* (last edited 5 hours ago)

Yeah I usually love Python but right now I'm working on a paid project where I need to deal with tasks that are critical to mostly work on first try. Now, if it would be a different matter if my code was just completely idiotic and still worked but Python doesn't error even when there is obvious typo that any statically compiled language could've picked up on a breeze at compile time.

I am scared to even implement a better logging system in my program because sometimes I forget to sanitize the arguments and my program fucking crashes at runtime because I added a new fucking logging statement.

I so fucking wish I had static type checking right now. The libraries I am using doesn't have types (via annotations) so unless I spend days fixing their shit, I will have to continue with these shitty runtime crashes for the shittiest small mistakes. I also can't trust these annotations because even if they are "wrong" their code coul perfectly work fine and they could even ship the wrong types. I would have the burden of dealing with their shitty annotations if that happens.

[-] myxi@toast.ooo 7 points 1 month ago* (last edited 1 month ago)

Vert guarantees a single file/directory when you extract something with it. If there are more than 1 file in the archive it will nest them in a directory. I have no plans to add any flags or anything to make it extract without nesting either.

[-] myxi@toast.ooo 6 points 1 month ago* (last edited 1 month ago)

So it detects if there's a single folder inside the zip containing all the files or all the files directly inside the zip?

Yes. It also has l (lowercase L) subcommand which lists the contents of the archives to the terminal (stdout).

[-] myxi@toast.ooo 8 points 1 month ago* (last edited 1 month ago)

UPDATE: Implemented VERT_USE_EXTERNAL_TOOLS environment variable. See #Configuration.

I had passed the filter parameter as "data", which should help prevent most issues with it but yes I agree that it would've been better to use external tools to do the heavy-lifting. I avoided them to make the program cross-platform and easier to setup (you currently can just run a simple pip command to install it). I may introduce them as optional backends later with a warning on the default ones but for now I'm postponing it.

80
submitted 1 month ago* (last edited 1 month ago) by myxi@toast.ooo to c/programming@programming.dev

I like trying out new things quite frequently and often times these tools are packed in an archive file. But I'm in constant fear whenever I am to unpack those archives because sometimes there are hundreds of files and the person who packed them wouldn't even do the bare minimum of nesting them inside a directory.

Dolphin (file explorer) had a useful thing where it would detect whether the contents are already nested and if they are not only then it would nest them inside a directory. I tried searching for something similar for the CLI but couldn't find anything so here it is. Another benefit is that it supports .zip, .tar.xz, .tar.gz simultaneously so I don't need to deal with manpages of unzip, tar thousand times just because I keep forgetting how to use them. Now it's just vert x file.zip.

I can add support for a few more formats but I don't feel the need at least for now (PRs welcome).

myxi

joined 1 month ago