Simple tool for automatic file management
1<!-- 2SPDX-FileCopyrightText: 2024 Łukasz Niemier <#@hauleth.dev> 3 4SPDX-License-Identifier: EUPL-1.2 5--> 6 7# PTSD 8 9[![builds.sr.ht status](https://builds.sr.ht/~hauleth/ptsd.svg)](https://builds.sr.ht/~hauleth/ptsd?) 10 11Simple tool for automatic file management. Basically `find … -exec`/`fd … --exec` 12with configuration file. 13 14## Name 15 16It stands for *Python Tremendously Sucks Dicks* and it was created in anger after 17I tried to package [Organize][] for Nix. It was pain, even when I was working 18alongside of one of Poetry maintainers. So as that experience was quite 19suboptimal I come up with idea of writing such project on my own and I have gave 20it a name that relates to the experience I had with Python. 21 22Hopefully this will be simpler to write and to package it as a Rust project 23rather than Python. 24 25## Why Rust? 26 27Why not? I was thinking also about using Zig that I am learning, but I know Rust 28better and the ecosystem of Rust is in better state. Maybe I will rewrite it 29later. 30 31## Supported platforms 32 33I develop it and maintain it mostly on macOS, so most \*nixes should be ok. I 34will probably test it on Linux as well. I do not have Windows machine nor I care 35enough about that platform, so support for it may be wonky (unless someone, 36potentially You, will be willing to take care of it). 37 38## Configuration 39 40TBD, but current plan is to use JSON files. 41 42> But Hauleth, JSON sucks for configuration as it is quite verbose, lacks 43> comments, etc. So why not use something like JSON5, TOML, Dhall, Nickel 44> or other? 45 46Good question. I was thinking about using either Dhall or Nickel, but in the end 47I come to the conclusion that I want to use it from Nix anyway, so just using 48plain JSON and generating it from Nix derivation will be much simpler than using 49some fancy pants configuration language. In the end you can also use Nickel or 50Dhall from CLI and pass the generated file to the `ptsd`. Also if there will be 51need other formats can be easily added as `ptsd` uses Rust's Serde, which allows 52us to easily add new formats in the future if needed. 53 54## Similar tools 55 56- [Organize][] - written in Python, was "inspiration" to write this tool as 57 packaging this tool for Nixpkgs was a horror. So instead I come up with an 58 idea to write my own. 59- [Maid][] - written in Ruby, I wanted to use that, but it seems to be a little 60 bit stalled. Also wanted something that would be easier to manage from Nixpkgs 61 instead of separate DSL. 62- [Hazel][] - commercial software for macOS, with GUI and stuff, but I am 63 developer so instead of spending few minutes of my work (in USD) I prefer to 64 waste few days of my life on writing tool on my own. Also see above about the 65 Nixpkgs stuff. 66 67[Organize]: https://github.com/tfeldmann/organize 68[Maid]: https://github.com/maid/maid 69[Hazel]: https://www.noodlesoft.com 70 71## License 72 73EUPL-1.2 or later