ramonsaraiva / pictory

Simple tool to organize pictures and videos in lickable directories
MIT License
36 stars 9 forks source link

Methods for handling duplicates #5

Closed Abelarm closed 5 years ago

Abelarm commented 5 years ago

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

Abelarm commented 5 years ago

here you are!

I hope everything is fine.