Futilities/human/fic

From Woozle Writes Code
Jump to navigation Jump to search
FIC: File Index Comparator

About

This looks at a list of file-tree indexes (in the format that FTI outputs) and outputs a data-file which lists:

  • all the indexes inspected; for each index, it lists:
    • an internally-assigned shortcode (A, B, etc.)
    • the index's filespec
    • the path that was examined to build the index
  • all the hashes found; for each hash, it lists:
    • the shortname of the index containing it
    • the paths of the matching files

Command

This uses the standard spidering options.

History

  • 2022-10-13 It seems to be spidering only a portion of the tree, so I'm adding some options to log what it spidered (which should also be useful in other contexts).
  • 2022-10-07 Revising how this works -- I think what I want is: look at two file-indexes (FTI output), and save (in JSON) the following: (1) hashes found in both, (2) hashes found in A but not B, (3) hashes found in B but not A. Each hash should list the filespec(s) where it was found. Since we're showing the results of a cross-comparison, it gets too complicated to compare more than two indexes (a feature I've not ended up using, regardless), so we'll now only allow 2 files (model and compare)... but let's change the names to A and B, since all calculations are now symmetrical.
    • ...although now that I think about it, the output could be organized by hash, with each hash having a list of the places it was found (with filespecs). Hrm. Maybe wait for a need-case...