# My personal tools **These tools were made by me for me so a lot of them have some very questionable decisions implemented such as embedding a lot of configuration files** ## [cln](https://git.site.quack-lab.dev/dave/synclib) **Create symbolic links given a custom set of commands** Mainly created out of frustration of windows ""symbolic"" links This tool creates real symbolic links on any platform following the syntax of: `source,destination,force?` It respects existing files (be them real files or symbolic links) Unless force is set to *t* in which case only existing symbolic links are deleted (overwriten) Real files will never be deleted by this tool The commands can be given by: - stdin - a file - command line arguments - a directory Example: - stdin - `echo "this,that" | cln` - command line arguments - `sync this,that foo,bar "path containing spaces",baz` - files - `cln -f ` - directory - `cln -r ` - This mode looks for "sync" files recursively within the given directory and executes commands in those sync files Given its ability to read files for commands it can be used to manage a "standard" set of symbolic links ## [fiter](https://git.site.quack-lab.dev/dave/fiter) **Iterate over files and rename them incrementally** Example: Given ``` video1.mp4 video2.mp4 video3.mp4 image1.png image2.png executable.exe ``` Running `fiter *` would result in: ``` 00001.mp4 00002.mp4 00003.mp4 00005.png 00006.png 00007.exe ``` The order is **not guranteed** Running `fiter *.mp4` on the same folder would give: ``` 00001.mp4 00002.mp4 00003.mp4 image1.png image2.png executable.exe ``` The tool will not delete any files by overwriting existing ones And thanks to that it will fail when running on files that have already been renamed by it For such scenarios use `fiter -f ` *-f* renames all files to \.bak before renaming them back to their new iterative name This means that it can run on files that already have iterative names because none are being overwriten **It also means that, on failure, files are left as .bak** ## [fmoditer](https://git.site.quack-lab.dev/dave/fmoditer) **Iterate over files and rename them to their mod time** Works pretty much the same way as *iter* with the exception of *-f* which is not supported by *fmoditer* Example: Given ``` video1.mp4 video2.mp4 video3.mp4 ``` Running `fmoditer *.mp4` would result in ``` 2024-12-15T15-31-53.mp4 2022-03-06T12-55-00.mp4 2023-05-22T17-11-06.mp4 ``` ## [vsclean](https://git.site.quack-lab.dev/dave/vsclean) **"clean" vscode recent projects by deleting non existing entries and adding new folders** Reads given directories and adds all folders in directories to vscode's recent projects The idea is that all projects in a "projects" folder should be accessible to vscode Doing this manually requires opening every folder one by one It also removes non existent entries from recent projects and recent files ## [repo](https://git.site.quack-lab.dev/dave/gitea-api) **Creates repositories on gitea and assigns them as "origin" on the git repository in working directory** The configuration of this tool is done through environmental variables: ``` GITEA_USER=dave GITEA_PASSWORD=supersecret GITA_URL=https://git.site.quack-lab.dev/ ``` Fine grained configuration is applied through flags: ``` Usage of repo.exe: -f Force assignment of the remote (deletes existing origin) -n string Name of the repository (shorthand) -name string Name of the repository -ni Do not add remote to the new repo (shorthand) -noinit Do not add remote to the new repo -p Make the repository private (shorthand) -private Make the repository private -r string Name of the remote to create for the new repository (shorthand) (default "origin") -remote string Name of the remote to create for the new repository (default "origin") ``` ## [autoruns](https://git.site.quack-lab.dev/dave/autoruns) **Runs programs specified in *autoruns.json* (at compile time)** This tool is meant to replace windows autoruns and is meant to be magnitudes faster than windows autoruns note: autoruns is specifically embedded as to not have to drag *autoruns.json* across multiple directories It also supports automatically hiding/closing windows and running only programs that are not already running See sample *autoruns.json* in repository of the tool Supported json fields are: ```go Entry struct { Name string `json:"name"` // ^ only used for logging Path string `json:"path"` // ^ path to the program being run Disabled bool `json:"disabled"` // ^ all entries are enabled by default other than the ones with "disabled": "true" Procname string `json:"procname"` // ^ used for detection to determine whether or not the entry has to be run Procs []string `json:"procs"` // ^ (optional) used for scanning for additional processes before executing actions, some programs start multiple processes as children of the main process and some start multiple processes independently ProcsAction string `json:"procsaction"` // ^ (optional) specifies the action to apply specifically and only to procs Flags []string `json:"flags"` // ^ (optional) command line arguments to pass to executable when starting Workdir string `json:"workdir"` // ^ (optional) workdir in which to start the program Action string `json:"action"` // ^ (optional) what to do with the program on startup (supported are hide/close/click) ActionParams []string `json:"actionparams"` // ^ (optional) parameters for actions, currently used only for click, see example in autoruns.json ActionDelay int `json:"actiondelay"` // ^ (optional) amount of time (in milliseconds) to wait before running action on program startup } ```