diff --git a/README.md b/README.md index 12d99dd..fae5cbe 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,26 @@ cargo install --locked fif ``` ## Usage - +See `fif --help` for more. + +### The basics +The simplest way to use fif looks like this: ```bash -fif --help -``` \ No newline at end of file +fif -E images ~/Pictures +``` + +This command will scan all of the files with extensions used by image files (.jpg, .png, etc) in your `~/Pictures` +directory. + +You can also manually specify a set of extensions to use: + +```bash +fif -e jpeg,jpg,zip,docx ~/Documents +``` + +By default, fif will output a bash script that can be used to fix all the files it found with incorrect file extensions. +You might find it useful to output this script to a file (rather than to stdout): + +```bash +fif -E images ~/Pictures > output.sh +``` diff --git a/clippy.sh b/clippy.sh new file mode 100755 index 0000000..1b13eb3 --- /dev/null +++ b/clippy.sh @@ -0,0 +1,17 @@ +#!/bin/bash +fd -e rs -x touch {} +cargo clippy -- \ + -W clippy::nursery \ + -W clippy::perf \ + -W clippy::pedantic \ + -W clippy::complexity \ + -W clippy::cargo \ + -A clippy::unused_io_amount \ + -A clippy::redundant_closure_for_method_calls \ + -A clippy::shadow_unrelated \ + +# ALLOWS: +# unused_io_amount: there are two places where i want to read up to X bytes and i'm fine with getting less than that +# redundant_closure...: the alternative is often much more verbose +# shadow_unrelated: sometimes things that seem unrelated are actually related ;) +