Skip to content

nrebhun/FileSponge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FileSponge

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.

Installation

  1. Clone this repo
  2. run build.sh

Usage

  • 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

Features

  • 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>
  • copies files, maintaining the organizational structure of the source directory

System Requirements

  • Unix-based OS
  • Python >= 2.7

Change Log

v0.2.0

  • 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

v0.1.0

  • Initial functionality, accepting strictly two directories for comparison
  • Admittedly terrible usage

Planned Improvements

  • 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

About

Keep your projects DRY

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published