Image author: Мельк
CLI tool for processing files and strings.
Grace helps you organize your files by converting them to the proper case and clearing out unnecessary characters such as ` ' [ ] and many others.
Grace can also rename strings to the correct case and clear them of unnecessary characters.
Now Grace can renames files, directories and strings into a lot of cases, such as
Alternating-> tHiS wAySnake-> this_wayCamel-> thisWayKebab-> this-wayDot-> this.wayHeader-> This-WayNormal-> this wayOriginal-> "this way" (returns the string as it was)Pascal-> ThisWayPath-> this/waySentence-> This wayTitle-> This WayUpperSnake-> THIS_WAYWindowsPath-> this\way
You can download suitable executable from https://github.com/meinbaumm/grace/releases and copy it in some directory that is listed in your PATH (e.g. ~/bin).
You may also use cargo to install grace from crates.io:
cargo install grace-cli
Grace is written in Rust. You may build it yourself with the help of cargo. Just clone this repository and execute the cargo build command in its main directory:
cargo build --release
Grace now has the name grace-cli in crates.io.
But I prefer just grace more.
To avoid writing grace-cli every time, you can add an alias to your .bashrc or .zshrc file.
If you installed grace with cargo:
which grace-cliThen copy the output and in your .bashrc or .zshrc file write
alias grace="~/./.cargo/bin/grace-cli"Next source file like. And use with pleasure :)
source .zshrcgrace-cli --helpCLI tool for processing files and strings.
Usage: grace-cli <COMMAND>
Commands:
recase Recase string, file, or directory of files
sanitize Sanitize string of unnecessary characters
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
grace-cli recase file -f example\ file\ \[2023\].pdf -i snake --sanitizeWill recase example file [2023].pdf file into snake case example_file_2023.pdf, removing redundant symbols.
grace-cli recase files -d test-dir/ -i camelWill recase all files in provided directory into camelCase. If you wand recase only files with specific extension, use -f/--formats flag.
grace-cli recase files -d test-dir/ -i camel -f "pdf, epub"If you wand recase directories too, you can write
grace-cli recase files -d test-dir/ -i camel -dGrace also can rename files recursively, just provide -r/--recursive flag.
grace-cli recase files -d test-dir/ -i camel -rWill recase all files in provided directories and files in subdirectories.
Unfortunately, recursively renaming directories is not supported now.
grace-cli recase dir -f test-dir/ -i snakeWill recase test-dir/ into snake case.
grace-cli recase string "Some Long String You Want To Recase Into Sentence" -i sentenceWill return
Some long string you want to recase into sentence
- spider-web-search A tool for web search on your favorite sites.
- AL CLI tool for open/close your apps and web URLs.
