diff options
author | Thomas Voss <mail@thomasvoss.com> | 2022-11-05 00:04:54 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2022-11-05 00:04:54 +0100 |
commit | fb7d63f1a9c553ed0b48569db2e646f42684be55 (patch) | |
tree | a216cd632b80af6b5ab6ac69bb727af3cd2865d9 /src/flags.rs | |
parent | 65f315266bff003ef4d66bbd351871ae341559dd (diff) |
Begin work on v2.0.0
The original release of mmv took filenames as command line arguments,
opened them in an editor, and then used the saved changes to rename
files. This commit begins work on a new version of mmv where files are
provided via the standard input and the command line arguments specify a
process to spawn. The spawned process reads command line arguments from
the standard input, processes them, and prints new names to the standard
output. Those new names represent the new file names. Here are a few
example usages, some more useful than others.
Reverse file names:
$ ls * | mmv rev
Edit file names in your editor (v1.0.0 behavior):
$ ls * | mmv vipe
Number movies so they’re automatically sorted:
$ ls movie1 movie2 ... movieN \
| mmv awk '{ printf "%02d-%s\n", NR, $0 }'
Diffstat (limited to 'src/flags.rs')
-rw-r--r-- | src/flags.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/flags.rs b/src/flags.rs new file mode 100644 index 0000000..504f0f9 --- /dev/null +++ b/src/flags.rs @@ -0,0 +1,16 @@ +#[derive(Debug)] +pub struct Flags { + pub encode: bool, + pub individual: bool, + pub nul: bool +} + +impl Default for Flags { + fn default() -> Flags { + Flags { + encode: false, + individual: false, + nul: false + } + } +} |