classify_carve: the usage line names tools/classify_carve.py (EGEN-CLASSIFYCARVE-USAGE) (#6752)

Squash-merged after diff review of PR #6752
This commit is contained in:
evilclanker9000
2026-11-23 17:47:35 +01:00
committed by GitHub
parent 6f58bd2c56
commit d90444f21e
2 changed files with 4 additions and 2 deletions

View File

@ -292,6 +292,8 @@ class MainTests(unittest.TestCase):
cwd=self.root)
self.assertEqual(proc.returncode, 0)
self.assertIn("usage", proc.stdout)
# The printed line is meant to be copied from the repository root, so it names the tool's folder.
self.assertIn("python -I tools/classify_carve.py", proc.stdout)
self.assertEqual(proc.stderr, "")
self.assertEqual(os.listdir(self.root), []) # nothing read or written

View File

@ -8,7 +8,7 @@ Classes:
other:<hex> anything else, keyed by its first 4 bytes
Usage:
python -I classify_carve.py <work>\\carve
python -I tools/classify_carve.py <work>\\carve
Writes types.json (per archive and overall counts/bytes per class, plus size stats) and prints a summary.
Every per-class entry, overall and per archive, is {"files": N, "bytes": B, "min": ..., "max": ..., "median": ...}:
min, max and median are the smallest, largest and median file size in bytes among the files of that class in that
@ -63,7 +63,7 @@ def entry(v):
return {"files": v[0], "bytes": v[1], "min": min(sizes), "max": max(sizes), "median": median_low(sizes)}
USAGE = "usage: python -I classify_carve.py <work>\\carve"
USAGE = "usage: python -I tools/classify_carve.py <work>\\carve"
def main():