Extracts files duplicated across directories, to keep your projects DRY.
By automatically identifying common files and project structure, projects may be better managed or modularized.
- Clone this repo
- run
build.sh
- output to
common/
:
$ ./fileSponge "test/foo" "test/bar" -o common
- output to
STDOUT
:
$ ./fileSponge "test/foo" "test/bar"
- for assistance, run with
-h
or flail helplessly
- compares two directories for identical files (i.e. files with matching name and contents)
- outputs identified duplicates to
STDOUT
or a directory specified with-o
- to clean up, run:
$ ./clean.sh <fileSponge-output-directory>
- to clean up, run:
- copies files, maintaining the organizational structure of the source directory
- Unix-based OS
- Python >= 2.7
- Add simpler CLI usage and a help menu (thanks, argparse)
- Add directory minimum (two)
- Add support for optional output target, default is
STDOUT
- Add caring about versioning, apparently
- Initial functionality, accepting strictly two directories for comparison
- Admittedly terrible usage
- Process more than two input directories
- Cleanup option, to remove original files after duplication to the "common" folder
- Allow for a range of acceptable similarity, where files which differ by less than
n
% are identified and copied to a different output location for simple evaluation - An "import" function for the "acceptable similarity range" feature. Once the user is satisfied with any changes made to the files identified, this function can be run to first move those into the "common" dir, then remove them from their original locations