Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New option --remember, to remember choices and re-apply them #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sshtmc
Copy link

@sshtmc sshtmc commented Aug 26, 2014

Hi,

first of all, thanks for this great tool, it helped me to quickly remove many duplicate photos I had on my disk.
Now, I made this small change, which allowed me to be much faster in removing duplicates. It basically remembers my choices for a set of duplicates (ie set of directories that hold duplicate files) and then re-applies the same choice if the same set of duplicate directories ever repeats again.

This allowed me to make ~50 selections for more than 1000 duplicates. That was a huge speedup for me. Of course, your mileage may vary ;)

Cheers,

@sshtmc sshtmc changed the title New option --remember-auto, to remember choices and re-apply them New option --remember, to remember choices and re-apply them Aug 26, 2014
@ssokolow
Copy link
Owner

Thanks. :)

I'm not sure that's the approach I'd want to take to that particular feature, but I was actually planning something similar. (You did match my style... but that's code I haven't gotten around to fully cleaning up yet.)

For more details, see the musing on a prefer command to accompany --prefer in issue #5, the plans in issue #6 to redesign pruneUI() to be easily extended with commands like link and prefer <#> or prefer <pattern>, and issue #7 for the link command itself.

I'll keep this pull request open as a TODO for prefer.

@sshtmc
Copy link
Author

sshtmc commented Aug 28, 2014

Sure, no problem for me whether you accept the pull or not. I used the code in this pull to quickly and painlessly remove >1000 duplicates I had in my photos collection, and then I thought it might be useful to someone else as well. My duplicates are gone and I don't need the tool anymore. :)

--prefer did not work for me since it's static, and I really want actiones remembered per folder pairs, not per folders. Also, I do not like (being afraid of possible mistakes) fiddling with command-line arguments, regular expressions, and who knows what else configuration option. I prefer the tools to be simple and intelligent, learning from user's behavior, and adapting to user's needs without requesting too much feedback, where it's not absolutely necessary.

--link also does not work form since I want the duplicates removed, not relinked. The primary concern is not the space, but having the same photo in multiple folders.

@ssokolow
Copy link
Owner

Most of what I linked was just for context. The relevant bit was the idea of adding a dynamic prefer command that could be abbreviated to p so you could type p 2 to get a behaviour similar to what your patch does. (Though it would still be per folder rather than per folder pair.)

As for doing exactly what your patch does, I'm wary of building every behaviour under the sun into the command-line interface, since that makes it hard to learn, but I do want to make it as versatile as possible, so I'll continue to work to make the codebase more hackable. (That's why I wrote it rather than just using rmlint. I'm trying to hit the sweet spot between speed and hackability.)

That's actually why I'm currently focusing on writing a unit test suite and, once that's done, some Sphinx plugins to improve and expand the auto-generated side of the documentation. It's much easier to hack on a codebase if it's got a comprehensive, easy-to-run set of automated tooling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants