fix separator reduction to single underscore and trim leading as well as trailing separators from output |
||
|---|---|---|
| src | ||
| .gitignore | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
🐍 snakify
Command line utility to quickly snake-caseify any input text.
Example
Quickly create source file from copied text
$ snakify 1879 Minimum XOR Sum of Two Arrays.rs | xargs touch
$ ls
total 0
0 ./ 0 ../ 0 1879_minimum_xor_sum_of_two_arrays.rs*
Installation
Make sure you have a working rust environment,
that supports #![feature(iter_intersperse)]
Then execute the following commands in order.
This assumes /usr/bin is on your $PATH:
- Clone the repository.
git clone https://gitlab.com/m-hgn/snakify.git - Build the release executable.
cd snakify && cargo build --release - Install the binary
sudo cp target/release/snakify-rs /usr/bin/snakify - Optional clean up
cd .. && rm -rf snakify