# nuitrcs/directory-scanning architecture

> Architecture diagram of the GitHub repository nuitrcs/directory-scanning, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nuitrcs/directory-scanning
- Repository: https://github.com/nuitrcs/directory-scanning

## Overview

This is a self-contained toolkit for researchers auditing and cleaning data directories. The main workflow is to point the command-line suite at a directory, optionally configure a SharePoint path check, and receive CSV/optional Excel reports. The suite orchestrates separate inventory, file-type, and largest-file analyses; the path-length check is conditional. The excerpts show the suite’s calls and scanning/report logic, while README descriptions support the documented standalone workflows and outputs.

Main entry points: [`scripts/src/run_all.py`](https://github.com/nuitrcs/directory-scanning/blob/main/scripts/src/run_all.py) (Report suite), [`scripts/src/scan_directory.py`](https://github.com/nuitrcs/directory-scanning/blob/main/scripts/src/scan_directory.py) (Folder inventory), [`scripts/src/summarize_filetypes.py`](https://github.com/nuitrcs/directory-scanning/blob/main/scripts/src/summarize_filetypes.py) (File-type summary), [`scripts/src/find_large_files.py`](https://github.com/nuitrcs/directory-scanning/blob/main/scripts/src/find_large_files.py) (Largest files)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Command orchestration"]
  node_run_suite["Report suite<br/>[run_all.py]"]
end

subgraph group_audits["Directory audits"]
  node_inventory["Folder inventory<br/>[scan_directory.py]"]
  node_file_types["File-type summary"]
  node_largest_files["Largest files"]
  node_path_check["Path-length check"]
end

subgraph group_reports["Report generation"]
  node_report_files["CSV / Excel reports"]
end

node_researcher(("Researcher"))
node_data_directory["Research data directory"]

node_researcher -->|"runs suite"| node_run_suite
node_researcher -->|"runs report"| node_inventory
node_researcher -->|"runs report"| node_file_types
node_researcher -->|"runs report"| node_largest_files
node_researcher -->|"runs check"| node_path_check
node_run_suite -->|"calls inventory"| node_inventory
node_run_suite -->|"calls summary"| node_file_types
node_run_suite -->|"calls scan"| node_largest_files
node_run_suite -->|"optionally calls"| node_path_check
node_inventory -->|"scans folders"| node_data_directory
node_file_types -->|"scans files"| node_data_directory
node_largest_files -->|"scans files"| node_data_directory
node_path_check -->|"checks paths"| node_data_directory
node_inventory -->|"writes reports"| node_report_files
node_file_types -->|"writes reports"| node_report_files
node_largest_files -->|"writes reports"| node_report_files
node_path_check -->|"writes reports"| node_report_files

click node_run_suite "https://github.com/nuitrcs/directory-scanning/blob/main/scripts/src/run_all.py"
click node_inventory "https://github.com/nuitrcs/directory-scanning/blob/main/scripts/src/scan_directory.py"
click node_file_types "https://github.com/nuitrcs/directory-scanning/blob/main/scripts/src/summarize_filetypes.py"
click node_largest_files "https://github.com/nuitrcs/directory-scanning/blob/main/scripts/src/find_large_files.py"
click node_path_check "https://github.com/nuitrcs/directory-scanning/blob/main/scripts/src/check_path_length.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_run_suite toneBlue
class node_inventory,node_file_types,node_largest_files,node_path_check toneAmber
class node_report_files toneMint
class node_researcher,node_data_directory toneIndigo
```

## Components

### Command orchestration

- [Report suite](https://github.com/nuitrcs/directory-scanning/blob/main/scripts/src/run_all.py): `scripts/src/run_all.py`

### Directory audits

- [Folder inventory](https://github.com/nuitrcs/directory-scanning/blob/main/scripts/src/scan_directory.py): `scripts/src/scan_directory.py`
- [File-type summary](https://github.com/nuitrcs/directory-scanning/blob/main/scripts/src/summarize_filetypes.py): `scripts/src/summarize_filetypes.py`
- [Largest files](https://github.com/nuitrcs/directory-scanning/blob/main/scripts/src/find_large_files.py): `scripts/src/find_large_files.py`
- [Path-length check](https://github.com/nuitrcs/directory-scanning/blob/main/scripts/src/check_path_length.py): `scripts/src/check_path_length.py`

### Report generation

- **CSV / Excel reports**

### Other components

- **Researcher**
- **Research data directory**

## Connections

- Researcher → Report suite: runs suite (evidence: `README.md`)
- Researcher → Folder inventory: runs report (evidence: `README.md`)
- Researcher → File-type summary: runs report (evidence: `README.md`)
- Researcher → Largest files: runs report (evidence: `README.md`)
- Researcher → Path-length check: runs check (evidence: `README.md`)
- Report suite → Folder inventory: calls inventory (evidence: `scripts/src/run_all.py`)
- Report suite → File-type summary: calls summary (evidence: `scripts/src/run_all.py`)
- Report suite → Largest files: calls scan (evidence: `scripts/src/run_all.py`)
- Report suite → Path-length check: optionally calls (evidence: `scripts/src/run_all.py`)
- Folder inventory → Research data directory: scans folders (evidence: `README.md`)
- File-type summary → Research data directory: scans files (evidence: `README.md`)
- Largest files → Research data directory: scans files (evidence: `README.md`)
- Path-length check → Research data directory: checks paths (evidence: `scripts/src/check_path_length.py`)
- Folder inventory → CSV / Excel reports: writes reports (evidence: `README.md`)
- File-type summary → CSV / Excel reports: writes reports (evidence: `README.md`)
- Largest files → CSV / Excel reports: writes reports (evidence: `README.md`)
- Path-length check → CSV / Excel reports: writes reports (evidence: `scripts/src/check_path_length.py`)
