First was added the argument parse, with first argument the path and second --duplicates, optional
(default value skip)
The argument duplicates have 4 choices: [skip, over, pref, suff]
skip: skip the duplicated file
over: overwrite the duplicated file
pref: add a prefix to the duplicated file
suff: add a suffix to the duplicated file
The way this is handled is with a dictionary where the keys are the 4 choices and the value are the functions that implement that behaviour.
In this way should be easy to change the strings or the expected behaviour.
Improvement
The only part I don't really like is the global variable count_int that is used for adding the right prefix/suffix.
That can be improved
Issue: #1
Comment on the PR
First was added the argument parse, with first argument the path and second --duplicates, optional (default value skip) The argument duplicates have 4 choices: [skip, over, pref, suff]
The way this is handled is with a dictionary where the keys are the 4 choices and the value are the functions that implement that behaviour.
In this way should be easy to change the strings or the expected behaviour.
Improvement
The only part I don't really like is the global variable count_int that is used for adding the right prefix/suffix. That can be improved