From c61d3dcb02f12d5eafd04c7875ac02353b721122 Mon Sep 17 00:00:00 2001 From: Ayooluwa Isaiah Date: Mon, 26 Apr 2021 11:33:14 +0100 Subject: [PATCH] Update README --- README.md | 48 +++++++----------------------------------------- 1 file changed, 7 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index dbff2fc..af66ae7 100644 --- a/README.md +++ b/README.md @@ -24,10 +24,10 @@ - F2 helps you organise your filesystem through batch renaming so that your files and directories can have a consistent naming scheme. - It offers a comprehensive set of renaming options and scales well from trivial string replacements to more complex operations involving regular expressions. - F2 prioritises correctness and safety by ensuring that a renaming operation does not result in conflicts or errors. It runs several [validations](https://github.com/ayoisaiah/f2/wiki/Validation-and-conflict-detection) before carrying out a renaming operation and provides an easy way to automatically [fix any detected conflicts](https://github.com/ayoisaiah/f2/wiki/Validation-and-conflict-detection#auto-fixing-conflicts). -- F2 supports all the standard renaming recipes including (but not limited to) string replacement, insertion of text as a prefix, suffix or other position in the filename, stripping a set of characters, changing the case of a set of letters, using auto incrementing numbers, swapping parts of the file name, e.t.c. +- F2 supports all the standard renaming recipes including (but not limited to) string replacement, insertion of text as a prefix, suffix or other position in the file name, stripping a set of characters, changing the case of a set of letters, using auto incrementing numbers, swapping parts of the file name, e.t.c. - F2 provides several [built-in variables](https://github.com/ayoisaiah/f2/wiki/Built-in-variables) for added flexibility in the renaming process. These variables are based on file attributes such as Exif information for images and ID3 tags for audio files. - F2 is very fast and won't waste your time. See [benchmarks](#benchmarks). -- F2 allows you to revert any renaming operation performed with the program. This means you don't have to worry about making a mistake because you can always get back to the previous state without breaking a sweat. +- F2 allows you to [revert any renaming operation](https://github.com/ayoisaiah/f2/wiki/Undoing-a-renaming-operation) performed with the program. This means you don't have to worry about making a mistake because you can always get back to the previous state without breaking a sweat. - F2 has good test coverage with equal attention paid to all supported platforms (Linux, Windows and macOS). - F2 is [well documented](https://github.com/ayoisaiah/f2/wiki) so that you won't have to scratch your head while figuring out what you can do with it. Lots of examples are provided to aid comprehension. @@ -113,19 +113,20 @@ AUTHOR: Ayooluwa Isaiah VERSION: - v1.4.0 + v1.5.0 FLAGS: --find , -f Search . Treated as a regular expression by default. Use -s or --string-mode to opt out --replace , -r Replacement . If omitted, defaults to an empty string. Supports built-in and regex capture variables - --start-num , -n When using an auto incrementing number in the replacement string such as %03d, start the count from (default: 1) --exclude , -E Exclude files/directories that match the given find pattern. Treated as a regular expression. Multiple exclude s can be specified. - --output-file , -o Output a map for the current operation --exec, -x Execute the batch renaming operation (default: false) --recursive, -R Rename files recursively (default: false) --max-depth , -m positive indicating the maximum depth for a recursive search (set to 0 for no limit) (default: 0) - --undo file, -u file Undo a successful operation using a previously created map file + --undo, -u Undo the last operation performed in the current working directory. (default: false) + --sort Sort the matches according to the provided + --sortr Same as but presents the matches in the reverse order --ignore-case, -i Ignore case (default: false) + --quiet, -q Don't print out any information including errors (default: false) --ignore-ext, -e Ignore extension (default: false) --include-dir, -d Include directories (default: false) --only-dir, -D Rename only directories (implies include-dir) (default: false) @@ -505,41 +506,6 @@ variables, do consult the [relevant wiki page](https://github.com/ayoisaiah/f2/wiki/Built-in-variables). -### Undoing changes - -Before you can undo a change, you must create a map file while making the -change: - -```bash -$ ls -a.txt b.txt -``` - -```bash -$ f2 -f 'txt' -r 'md' -o map.json -x -+-------+--------+--------+ -| INPUT | OUTPUT | STATUS | -+-------+--------+--------+ -| a.txt | a.md | ok | -| b.txt | b.md | ok | -+-------+--------+--------+ -``` - -```bash -$ ls -a.md b.md map.json -``` - -```bash -$ f2 -u map.json -+-------+--------+--------+ -| INPUT | OUTPUT | STATUS | -+-------+--------+--------+ -| a.md | a.txt | ok | -| b.md | b.txt | ok | -+-------+--------+--------+ -``` - ## Credits F2 relies on other open source software listed below: