qarmin / czkawka

Multi functional app to find duplicates, empty folders, similar images etc.
Other
19.81k stars 647 forks source link

Support more flexible duplicate file linking #149

Open Anonymous1157 opened 3 years ago

Anonymous1157 commented 3 years ago

Thanks for making this application. This is a really good file deduplicator and I'm excited about it.

Currently Czkawka supports using symlinks to deduplicate files, but the symlinks are created with absolute directory paths, and the way the function works is not immediately obvious.

  1. Add a configuration option to create relative symlinks instead. Alternatively, ask the user if they want to use absolute or relative paths when they click the button. Maybe the configuration options can be "absolute", "relative", or "ask every time".
  2. Add a way to select which duplicate to keep as a real file and which one(s) will be replaced with symlinks. This would be useful when trying to deduplicate icons and themes so that color variants always link back to the original version, which makes sense for theme management.
  3. Make the symlink function more intuitive. I tried to select only one file in a duplicate group that I wanted to symlink to the other because this would be similar to how the delete function works, but the symlink function requires at least two selections, so the button just cleared my selections without doing anything. Resolving this could be as simple as deactivating the button until two files from the same duplicate group are selected, because this communicates to the user how the function works as they're exploring the application.
  4. Add support for hardlinks. Sometimes a symlink doesn't make sense, or some other application needs to interact with the data being deduplicated that doesn't handle symlinks gracefully, for example tools like rsync that don't have special support for FAT32 destination filesystems.
Anonymous1157 commented 3 years ago

I was thinking about the second point and came up with this: idea

TiagoTiago commented 3 years ago

How about using emojis to mark what will happen to each file?

Something like:

✅ Original 🔗 Link ❌ Delete 🙈 Ignore

Anonymous1157 commented 3 years ago

That doesn't explain how the user will select the original file. However it would be a better way to display the actions that would be taken.

The UI could be changed to work like this:

  1. Click on a file in the list. A chain link icon will appear next to that file to show that it will be symlinked. A checkbox will appear next to a different file in the same group to show that it will be the original file where symlinks point.
  2. Click on a file with a chain link. The icon will change to a trashcan to show that it will be deleted. If no other files in the group have a chain link, the checkbox disappears from the file that has it.
  3. Click on the file with the checkbox. Its icon will change to the chain link and another file will get the checkbox. If there are no more files with no icon that could become the checkbox, flash all the chain link icons in the group to communicate to the user visually that it was an error and nothing happened.
  4. Click on a file with the trashcan. It clears the icon and the file will not be modified, unless it becomes the new link target as the user makes more selections.
  5. Click on a new Apply button that will be where the Delete and Symlink buttons are now. The actions represented by the icons are committed.

I'd rather not use emoji though. Unicode has 🗸 🗑 🔗 symbols that could work and would match the user's font without being tacky, and there should be symbols in the system icon theme for each platform that could work as well.

TiagoTiago commented 3 years ago

Sure, oldschool characters would work as well, and if there's indeed guaranteed corresponding system icons, that would also be an option, specially if you can control the size they're displayed on screen without significant concern about legibility.

kikecalpe commented 3 years ago
2. **Add a way to select which duplicate to keep as a real file** and which one(s) will be replaced with symlinks. This would be useful when trying to deduplicate icons and themes so that color variants always link back to the original version, which makes sense for theme management.

One idea about how that could be done: