dirplot 0.3.0__tar.gz → 0.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dirplot-0.3.0 → dirplot-0.3.2}/CHANGELOG.md +115 -28
- {dirplot-0.3.0 → dirplot-0.3.2}/PKG-INFO +31 -6
- {dirplot-0.3.0 → dirplot-0.3.2}/README.md +26 -5
- {dirplot-0.3.0 → dirplot-0.3.2}/SECURITY.md +1 -1
- dirplot-0.3.2/alpine-pod.png +0 -0
- dirplot-0.3.2/aws-lambda.png +0 -0
- dirplot-0.3.2/demo.cast +418 -0
- dirplot-0.3.2/demo.yaml +26 -0
- dirplot-0.3.2/demo.yaml~ +16 -0
- dirplot-0.3.2/demo1.cast +414 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/docs/ARCHIVES.md +65 -6
- {dirplot-0.3.0 → dirplot-0.3.2}/docs/EXAMPLES.md +10 -0
- dirplot-0.3.2/docs/docker.png +0 -0
- dirplot-0.3.2/docs/fastapi.png +0 -0
- dirplot-0.3.2/docs/flask.png +0 -0
- dirplot-0.3.2/docs/k8s.png +0 -0
- dirplot-0.3.2/docs/pypy.png +0 -0
- dirplot-0.3.2/docs/python.png +0 -0
- dirplot-0.3.2/docs/s3.png +0 -0
- dirplot-0.3.2/foo.svg +158 -0
- dirplot-0.3.2/gen_asciicast.py +306 -0
- dirplot-0.3.2/misc/scan/FILE-SCANNING.md +72 -0
- dirplot-0.3.2/misc/scan/compare.py +58 -0
- dirplot-0.3.2/misc/scan/scan_async.py +93 -0
- dirplot-0.3.2/misc/scan/scan_dir.py +66 -0
- dirplot-0.3.2/misc/scan/scan_rust.py +33 -0
- dirplot-0.3.2/misc/scan/scan_threaded.py +90 -0
- dirplot-0.3.2/misc/scan/scan_walk.py +46 -0
- dirplot-0.3.2/misc/watch/foo.txt +2 -0
- dirplot-0.3.2/misc/watch/watch_dir.py +72 -0
- dirplot-0.3.2/misc/watch/wordcloud1.png +0 -0
- dirplot-0.3.2/misc-watched.png +0 -0
- dirplot-0.3.2/openclaw.png +0 -0
- dirplot-0.3.2/pg.png +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/pyproject.toml +8 -2
- dirplot-0.3.2/scripts/animate_demo.py +121 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/scripts/make_docs_images.sh +1 -1
- dirplot-0.3.2/scripts/make_fixtures.py +340 -0
- dirplot-0.3.2/src/dirplot/__main__.py +41 -0
- dirplot-0.3.2/src/dirplot/archives.py +359 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/src/dirplot/docker.py +1 -1
- {dirplot-0.3.0 → dirplot-0.3.2}/src/dirplot/github.py +56 -22
- {dirplot-0.3.0 → dirplot-0.3.2}/src/dirplot/k8s.py +11 -1
- {dirplot-0.3.0 → dirplot-0.3.2}/src/dirplot/main.py +304 -33
- {dirplot-0.3.0 → dirplot-0.3.2}/src/dirplot/render.py +208 -66
- dirplot-0.3.2/src/dirplot/scanner.py +192 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/src/dirplot/svg_render.py +134 -60
- dirplot-0.3.2/src/dirplot/watch.py +168 -0
- dirplot-0.3.2/src-portrait.png +0 -0
- dirplot-0.3.2/src.pdf +0 -0
- dirplot-0.3.2/src.png +0 -0
- dirplot-0.3.2/src.svg +382 -0
- dirplot-0.3.2/test-animation.png +0 -0
- dirplot-0.3.2/tests/animation/README.md +3 -0
- dirplot-0.3.2/tests/animation/changelog.txt +1 -0
- dirplot-0.3.2/tests/animation/config.toml +3 -0
- dirplot-0.3.2/tests/animation/data/records.csv +4 -0
- dirplot-0.3.2/tests/animation/data/schema_v1.json +1 -0
- dirplot-0.3.2/tests/animation/src/lib/parser.py +2 -0
- dirplot-0.3.2/tests/animation/src/main.py +7 -0
- dirplot-0.3.2/tests/conftest.py +257 -0
- dirplot-0.3.2/tests/fixtures/sample.7z +0 -0
- dirplot-0.3.2/tests/fixtures/sample.a +0 -0
- dirplot-0.3.2/tests/fixtures/sample.aab +0 -0
- dirplot-0.3.2/tests/fixtures/sample.apk +0 -0
- dirplot-0.3.2/tests/fixtures/sample.cpio +0 -0
- dirplot-0.3.2/tests/fixtures/sample.ear +0 -0
- dirplot-0.3.2/tests/fixtures/sample.epub +0 -0
- dirplot-0.3.2/tests/fixtures/sample.ipa +0 -0
- dirplot-0.3.2/tests/fixtures/sample.iso +0 -0
- dirplot-0.3.2/tests/fixtures/sample.jar +0 -0
- dirplot-0.3.2/tests/fixtures/sample.nupkg +0 -0
- dirplot-0.3.2/tests/fixtures/sample.rar +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/tests/fixtures/sample.tar.gz +0 -0
- dirplot-0.3.2/tests/fixtures/sample.tar.zst +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/tests/fixtures/sample.tgz +0 -0
- dirplot-0.3.2/tests/fixtures/sample.tzst +0 -0
- dirplot-0.3.2/tests/fixtures/sample.vsix +0 -0
- dirplot-0.3.2/tests/fixtures/sample.war +0 -0
- dirplot-0.3.2/tests/fixtures/sample.whl +0 -0
- dirplot-0.3.2/tests/fixtures/sample.xar +0 -0
- dirplot-0.3.2/tests/fixtures/sample.xpi +0 -0
- dirplot-0.3.2/tests/fixtures/sample.zip +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/tests/test_archives.py +222 -3
- {dirplot-0.3.0 → dirplot-0.3.2}/tests/test_cli.py +66 -3
- {dirplot-0.3.0 → dirplot-0.3.2}/tests/test_github.py +26 -3
- {dirplot-0.3.0 → dirplot-0.3.2}/tests/test_render.py +52 -1
- {dirplot-0.3.0 → dirplot-0.3.2}/tests/test_scanner.py +92 -1
- {dirplot-0.3.0 → dirplot-0.3.2}/tests/test_svg_render.py +49 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/uv.lock +51 -2
- dirplot-0.3.0/docs/docker.png +0 -0
- dirplot-0.3.0/docs/fastapi.png +0 -0
- dirplot-0.3.0/docs/flask.png +0 -0
- dirplot-0.3.0/docs/k8s.png +0 -0
- dirplot-0.3.0/docs/pypy.png +0 -0
- dirplot-0.3.0/docs/python.png +0 -0
- dirplot-0.3.0/docs/s3.png +0 -0
- dirplot-0.3.0/scripts/make_fixtures.py +0 -144
- dirplot-0.3.0/src/dirplot/__main__.py +0 -11
- dirplot-0.3.0/src/dirplot/archives.py +0 -225
- dirplot-0.3.0/src/dirplot/scanner.py +0 -92
- dirplot-0.3.0/src.svg +0 -370
- dirplot-0.3.0/tests/conftest.py +0 -132
- dirplot-0.3.0/tests/fixtures/sample.7z +0 -0
- dirplot-0.3.0/tests/fixtures/sample.apk +0 -0
- dirplot-0.3.0/tests/fixtures/sample.ear +0 -0
- dirplot-0.3.0/tests/fixtures/sample.epub +0 -0
- dirplot-0.3.0/tests/fixtures/sample.jar +0 -0
- dirplot-0.3.0/tests/fixtures/sample.rar +0 -0
- dirplot-0.3.0/tests/fixtures/sample.war +0 -0
- dirplot-0.3.0/tests/fixtures/sample.whl +0 -0
- dirplot-0.3.0/tests/fixtures/sample.xpi +0 -0
- dirplot-0.3.0/tests/fixtures/sample.zip +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/.claude/settings.local.json +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/.dockerignore +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/.github/dependabot.yml +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/.github/workflows/ci.yml +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/.github/workflows/publish.yml +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/.gitignore +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/.ipynb_checkpoints/Untitled-checkpoint.ipynb +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/.pre-commit-config.yaml +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/.python-version +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/CONTRIBUTING.md +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/Dockerfile +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/LICENSE +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/Makefile +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/TASKS.md~ +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/docs/SSH_DESIGN.md +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/docs/dirplot.png +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/scripts/open_terminals.sh +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/src/dirplot/__init__.py +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/src/dirplot/colors.py +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/src/dirplot/display.py +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/src/dirplot/fonts/JetBrainsMono-Bold.ttf +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/src/dirplot/fonts/JetBrainsMono-BoldItalic.ttf +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/src/dirplot/fonts/JetBrainsMono-Italic.ttf +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/src/dirplot/fonts/JetBrainsMono-Regular.ttf +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/src/dirplot/fonts/OFL.txt +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/src/dirplot/py.typed +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/src/dirplot/s3.py +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/src/dirplot/ssh.py +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/src/dirplot/terminal.py +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/tests/__init__.py +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/tests/example/bar/bar.py +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/tests/example/bar/baz.json +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/tests/example/foo/foo.md +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/tests/fixtures/sample.tar +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/tests/fixtures/sample.tar.bz2 +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/tests/fixtures/sample.tar.xz +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/tests/fixtures/sample.tbz2 +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/tests/fixtures/sample.txz +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/tests/test_colors.py +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/tests/test_display.py +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/tests/test_docker.py +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/tests/test_drawing.py +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/tests/test_k8s.py +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/tests/test_s3.py +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/tests/test_ssh.py +0 -0
- {dirplot-0.3.0 → dirplot-0.3.2}/tests/test_terminal.py +0 -0
|
@@ -7,6 +7,102 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.3.2] - 2026-03-13
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **`dirplot watch`** subcommand — watches a directory and regenerates the treemap
|
|
15
|
+
on every file-system change using watchdog (FSEvents on macOS, inotify on Linux,
|
|
16
|
+
kqueue on BSD). Requires `watchdog`, now a core dependency.
|
|
17
|
+
```bash
|
|
18
|
+
dirplot watch . --output treemap.png
|
|
19
|
+
dirplot watch . --output treemap.png --animate # APNG, one frame per change
|
|
20
|
+
```
|
|
21
|
+
- **Vertical file labels**: file tiles that are at least twice as tall as wide now
|
|
22
|
+
display their label rotated 90° CCW, letting the text span the full tile height
|
|
23
|
+
instead of being squeezed into the narrow width.
|
|
24
|
+
- **Scan and render timing** shown in header output:
|
|
25
|
+
`Found 1,414 files … [2.3s]` and `Saved dirplot to out.png [0.4s]`.
|
|
26
|
+
- **Multiple local roots**: `dirplot map src tests` accepts two or more local
|
|
27
|
+
directory paths, finds their common parent, and shows only those subtrees.
|
|
28
|
+
- **`--subtree` / `-s`** option (repeatable) — allowlist complement to `--exclude`:
|
|
29
|
+
keep only the named direct children of the root after scanning. Supports nested
|
|
30
|
+
paths such as `--subtree src/dirplot/fonts`.
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- `--exclude` on pod and Docker backends now prunes entire subtrees — previously only
|
|
35
|
+
the exact path was matched, so all children leaked through.
|
|
36
|
+
- Clearer error for distroless pods: exit code 126 from `kubectl exec` now surfaces as
|
|
37
|
+
an actionable message explaining that the container has no shell or `find` utility.
|
|
38
|
+
- Adaptive file-label font size is now computed with a single `textbbox` measurement
|
|
39
|
+
(one call per tile) instead of stepping down one pixel at a time — eliminates an
|
|
40
|
+
O(font_size × n_tiles) bottleneck that caused near-blocking on large trees such as
|
|
41
|
+
`.venv` directories.
|
|
42
|
+
|
|
43
|
+
### Changed
|
|
44
|
+
|
|
45
|
+
- `-s` short alias reassigned from `--font-size` to `--subtree`. `--font-size` still
|
|
46
|
+
works as before; it just no longer has a single-letter alias.
|
|
47
|
+
|
|
48
|
+
## [0.3.1] - 2026-03-11
|
|
49
|
+
|
|
50
|
+
### Added
|
|
51
|
+
|
|
52
|
+
- `github://` URI now accepts an optional subpath after the repository name, letting
|
|
53
|
+
you scan a subdirectory directly:
|
|
54
|
+
- `github://owner/repo/sub/path` — subpath on the default branch
|
|
55
|
+
- `github://owner/repo@ref/sub/path` — subpath on a specific branch, tag, or commit SHA
|
|
56
|
+
- `https://github.com/owner/repo/tree/branch/sub/path` — full GitHub URL form
|
|
57
|
+
- Tags and commit SHAs are supported wherever a branch ref was previously accepted
|
|
58
|
+
(e.g. `github://torvalds/linux@v6.12`), as the GitHub trees API accepts any git ref.
|
|
59
|
+
- `--legend N` replaces the old boolean `--legend/--no-legend` flag. It now shows a
|
|
60
|
+
**file-count legend** — a sorted list of the top N extensions by number of files,
|
|
61
|
+
with a coloured swatch and the file count for each entry:
|
|
62
|
+
- Pass `--legend` alone to use the default of 20 entries.
|
|
63
|
+
- Pass `--legend 10` for a custom limit.
|
|
64
|
+
- Omit the flag entirely to show no legend.
|
|
65
|
+
- The number of rows is also capped automatically so the box never overflows the
|
|
66
|
+
image, based on available vertical space and the current `--font-size`.
|
|
67
|
+
- Extensions with the same count are sorted alphabetically as a tiebreaker.
|
|
68
|
+
- When the total number of extensions exceeds the limit, a `(+N more)` line is
|
|
69
|
+
appended at the bottom of the box.
|
|
70
|
+
|
|
71
|
+
- The root tile header now includes a summary of the scanned tree after an em-dash
|
|
72
|
+
separator: `myproject — 124 files, 18 dirs, 4.0 MB (4,231,680 bytes)`.
|
|
73
|
+
Applies to both PNG and SVG output. The label is truncated with `…` when the tile
|
|
74
|
+
is too narrow to fit the full string.
|
|
75
|
+
|
|
76
|
+
- Greatly expanded archive format support via the new `libarchive-c` core dependency
|
|
77
|
+
(wraps the system libarchive C library):
|
|
78
|
+
- **New formats**: `.iso`, `.cpio`, `.xar`, `.pkg`, `.dmg`, `.img`, `.rpm`, `.cab`,
|
|
79
|
+
`.lha`, `.lzh`, `.a`, `.ar`, `.tar.zst`, `.tzst`
|
|
80
|
+
- **New ZIP aliases**: `.nupkg` (NuGet), `.vsix` (VS Code extension), `.ipa` (iOS app),
|
|
81
|
+
`.aab` (Android App Bundle)
|
|
82
|
+
- `.tar.zst` / `.tzst` routed through libarchive for consistent behaviour across all
|
|
83
|
+
supported Python versions (stdlib `tarfile` only gained zstd support in 3.12).
|
|
84
|
+
- `libarchive-c>=5.0` added as a core dependency alongside `py7zr` and `rarfile`.
|
|
85
|
+
Requires the system libarchive library:
|
|
86
|
+
`brew install libarchive` / `apt install libarchive-dev`.
|
|
87
|
+
- See [ARCHIVES.md](docs/ARCHIVES.md) for the full format table, platform notes, and
|
|
88
|
+
intentionally unsupported formats (`.deb`, UDIF `.dmg`).
|
|
89
|
+
- Encrypted archive handling:
|
|
90
|
+
- `--password` CLI option passes a passphrase upfront.
|
|
91
|
+
- If an archive turns out to be encrypted and no password was given, dirplot prompts
|
|
92
|
+
interactively (`Password:` hidden-input prompt) and retries — no need to re-run with a flag.
|
|
93
|
+
- A wrong password exits cleanly with `Error: incorrect password.`
|
|
94
|
+
- `PasswordRequired` exception exported from `dirplot.archives` for programmatic use.
|
|
95
|
+
- **Encryption behaviour by format** (since dirplot reads metadata only, never extracts):
|
|
96
|
+
- ZIP and 7z: central directory / file list is unencrypted by default → readable without
|
|
97
|
+
a password even for encrypted archives.
|
|
98
|
+
- RAR with header encryption (`-hp`): listing is hidden without password;
|
|
99
|
+
wrong password raises `PasswordRequired`.
|
|
100
|
+
|
|
101
|
+
### Fixed
|
|
102
|
+
|
|
103
|
+
- `--version` moved back to the top-level `dirplot` command (was accidentally scoped
|
|
104
|
+
to `dirplot map` after the CLI was restructured into subcommands).
|
|
105
|
+
|
|
10
106
|
## [0.3.0] - 2026-03-10
|
|
11
107
|
|
|
12
108
|
### Added
|
|
@@ -22,33 +118,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
22
118
|
the scanned path are traversed — the common case in k8s where images declare
|
|
23
119
|
`VOLUME` entries that are always mounted on a separate filesystem.
|
|
24
120
|
- Automatically falls back to a portable `sh` + `stat` loop on BusyBox/Alpine pods.
|
|
25
|
-
- `github://owner/repo[@branch]` URI scheme for GitHub repository scanning. The old
|
|
26
|
-
`github:owner/repo` shorthand has been removed.
|
|
27
|
-
- File tiles now have a 1-px dark outline (60/255 below fill colour per channel) so
|
|
28
|
-
adjacent same-coloured tiles — e.g. a directory full of extension-less files — are
|
|
29
|
-
always visually distinct rather than blending into a single flat block.
|
|
30
|
-
|
|
31
|
-
### Changed
|
|
32
|
-
|
|
33
|
-
- `docs/REMOTE-ACCESS.md` renamed to `docs/EXAMPLES.md`; Docker and Kubernetes pod
|
|
34
|
-
sections added; images with captions added for all remote backends.
|
|
35
|
-
|
|
36
|
-
### Fixed
|
|
37
|
-
|
|
38
|
-
- SVG tooltips now show the original byte count when `--log` is active, not the
|
|
39
|
-
log-transformed layout value. `Node.original_size` is populated by `apply_log_sizes`
|
|
40
|
-
for both file and directory nodes and is used by the SVG renderer for `data-size`.
|
|
41
|
-
- GitHub error messages are now clear and actionable:
|
|
42
|
-
- 401 explicitly says the token is invalid or expired.
|
|
43
|
-
- 403 distinguishes rate-limit exceeded (with the 60 vs 5,000 req/h figures and a
|
|
44
|
-
token hint) from a permissions failure on a private repository.
|
|
45
|
-
- 404 now also hints that a token is required for private repositories (GitHub returns
|
|
46
|
-
404, not 403, for private repos accessed without authentication).
|
|
47
|
-
- Errors are caught in the CLI and printed as a single `Error: …` line to stderr
|
|
48
|
-
instead of showing a Python traceback.
|
|
49
|
-
|
|
50
|
-
### Added
|
|
51
|
-
|
|
52
121
|
- Docker container scanning via `docker://container:/path` syntax — uses `docker exec`
|
|
53
122
|
and `find` to build the tree without copying files out of the container. Works on any
|
|
54
123
|
running container that has a POSIX shell and `find` (GNU or BusyBox). No extra
|
|
@@ -70,7 +139,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
70
139
|
overlay (`gradientUnits="objectBoundingBox"`), defined once and shared across all tiles.
|
|
71
140
|
Matches the ×1.20 highlight / ×0.80 shadow range of the PNG renderer.
|
|
72
141
|
Disabled with `--no-cushion`.
|
|
73
|
-
- `--format png|svg` CLI option; format is also auto-detected from the `--output` file
|
|
142
|
+
- `--format png|svg` CLI option; format is also auto-detected from the `--output` file
|
|
143
|
+
extension.
|
|
74
144
|
- `create_treemap_svg()` added to the public Python API (`from dirplot import create_treemap_svg`).
|
|
75
145
|
- `drawsvg>=2.4` added as a core dependency.
|
|
76
146
|
- Rename the treemap command to `map` (dirplot map <root>).
|
|
@@ -81,6 +151,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
81
151
|
- Support for local archive files, .zip, tgz, .tar.xz, .rar, .7z, etc.
|
|
82
152
|
- Include example archives for 17 different extentions for testing.
|
|
83
153
|
- Comprehensive documentation.
|
|
154
|
+
- `github://owner/repo[@branch]` URI scheme for GitHub repository scanning. The old
|
|
155
|
+
`github:owner/repo` shorthand has been removed.
|
|
156
|
+
- File tiles now have a 1-px dark outline (60/255 below fill colour per channel) so
|
|
157
|
+
adjacent same-coloured tiles — e.g. a directory full of extension-less files — are
|
|
158
|
+
always visually distinct rather than blending into a single flat block.
|
|
159
|
+
|
|
160
|
+
### Changed
|
|
161
|
+
|
|
162
|
+
- `docs/REMOTE-ACCESS.md` renamed to `docs/EXAMPLES.md`; Docker and Kubernetes pod
|
|
163
|
+
sections added; images with captions added for all remote backends.
|
|
164
|
+
|
|
165
|
+
### Fixed
|
|
166
|
+
|
|
167
|
+
- SVG tooltips now show the original byte count when `--log` is active, not the
|
|
168
|
+
log-transformed layout value. `Node.original_size` is populated by `apply_log_sizes`
|
|
169
|
+
for both file and directory nodes and is used by the SVG renderer for `data-size`.
|
|
170
|
+
- GitHub error messages are now clear and actionable.
|
|
84
171
|
|
|
85
172
|
## [0.2.0] - 2026-03-09
|
|
86
173
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dirplot
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: Static treemap bitmaps for directory trees and archives, displayed as inline terminal images
|
|
5
5
|
Project-URL: Repository, https://github.com/deeplook/dirplot
|
|
6
6
|
License: MIT
|
|
@@ -26,18 +26,22 @@ Classifier: Topic :: Utilities
|
|
|
26
26
|
Classifier: Typing :: Typed
|
|
27
27
|
Requires-Python: >=3.10
|
|
28
28
|
Requires-Dist: drawsvg>=2.4.1
|
|
29
|
+
Requires-Dist: libarchive-c>=5.0
|
|
29
30
|
Requires-Dist: matplotlib>=3.7
|
|
30
31
|
Requires-Dist: pillow>=9.0
|
|
31
32
|
Requires-Dist: py7zr>=0.20
|
|
32
33
|
Requires-Dist: rarfile>=4.0
|
|
33
34
|
Requires-Dist: squarify>=0.4
|
|
34
35
|
Requires-Dist: typer>=0.9
|
|
36
|
+
Requires-Dist: watchdog>=6.0.0
|
|
35
37
|
Provides-Extra: dev
|
|
36
38
|
Requires-Dist: mypy>=1.10; extra == 'dev'
|
|
37
39
|
Requires-Dist: pre-commit>=3.0; extra == 'dev'
|
|
38
40
|
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
|
|
39
41
|
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
40
42
|
Requires-Dist: ruff>=0.4; extra == 'dev'
|
|
43
|
+
Provides-Extra: libarchive
|
|
44
|
+
Requires-Dist: libarchive-c>=5.3; extra == 'libarchive'
|
|
41
45
|
Provides-Extra: s3
|
|
42
46
|
Requires-Dist: boto3>=1.26; extra == 's3'
|
|
43
47
|
Provides-Extra: ssh
|
|
@@ -69,9 +73,12 @@ Description-Content-Type: text/markdown
|
|
|
69
73
|
- **SVG output** (`--format svg` or `--output file.svg`) produces a fully self-contained interactive file: CSS hover highlight, a JavaScript floating tooltip panel, and cushion shading via a gradient — no external dependencies.
|
|
70
74
|
- Display via system image viewer or inline in the terminal (iTerm2 and Kitty protocols, auto-detected).
|
|
71
75
|
- Save output to a PNG or SVG file with `--output`.
|
|
72
|
-
- Exclude paths with `--exclude` (repeatable).
|
|
76
|
+
- Exclude paths with `--exclude` (repeatable), or focus on specific subtrees with `--subtree` / `-s` (allowlist complement, supports nested paths like `src/dirplot/fonts`).
|
|
77
|
+
- Pass multiple local paths (`dirplot map src tests`) to scan each independently and display them under their common parent, ignoring all other siblings.
|
|
73
78
|
- Works on macOS, Linux, and Windows; WSL2 fully supported.
|
|
74
|
-
- Scan remote hosts over SSH (`pip install "dirplot[ssh]"`), AWS S3 buckets (`pip install "dirplot[s3]"`), any public/private GitHub repository, **running Docker containers**, or **Kubernetes pods** — all without extra dependencies beyond the respective CLI/SDK. See [EXAMPLES.md](docs/EXAMPLES.md).
|
|
79
|
+
- Scan remote hosts over SSH (`pip install "dirplot[ssh]"`), AWS S3 buckets (`pip install "dirplot[s3]"`), any public/private GitHub repository (including specific branch, tag, commit SHA, or subdirectory), **running Docker containers**, or **Kubernetes pods** — all without extra dependencies beyond the respective CLI/SDK. See [EXAMPLES.md](docs/EXAMPLES.md).
|
|
80
|
+
- Optional **file-count legend** (`--legend`) — a corner overlay listing the top extensions by number of files, with coloured swatches and counts, automatically sized to fit the image.
|
|
81
|
+
- **Wide archive support** — reads zip, tar (gz/bz2/xz/zst), 7z, rar, and via libarchive: iso, cpio, rpm, cab, lha/lzh, xar/pkg, a/ar, and all ZIP-based formats (jar, whl, apk, nupkg, vsix, ipa, …) as virtual directory trees without unpacking. Encrypted archives are handled gracefully: metadata-only reads work without a password for most formats; a password can be supplied with `--password` or entered interactively when needed.
|
|
75
82
|
|
|
76
83
|
## How It Works
|
|
77
84
|
|
|
@@ -129,6 +136,13 @@ dirplot map . --inline
|
|
|
129
136
|
# Exclude directories
|
|
130
137
|
dirplot map . --exclude .venv --exclude .git
|
|
131
138
|
|
|
139
|
+
# Map two specific subtrees under their common parent
|
|
140
|
+
dirplot map src tests
|
|
141
|
+
|
|
142
|
+
# Focus on named subtrees of a root (allowlist; supports nested paths)
|
|
143
|
+
dirplot map . --subtree src --subtree tests
|
|
144
|
+
dirplot map . --subtree src/dirplot/fonts
|
|
145
|
+
|
|
132
146
|
# Use a different colormap and larger directory labels
|
|
133
147
|
dirplot map . --colormap Set2 --font-size 18
|
|
134
148
|
|
|
@@ -138,6 +152,12 @@ dirplot map . --size 1920x1080 --output dirplot.png --no-show
|
|
|
138
152
|
# Don't apply cushion shading — makes tiles look flat
|
|
139
153
|
dirplot map . --no-cushion
|
|
140
154
|
|
|
155
|
+
# Show a file-count legend (top 20 extensions by default)
|
|
156
|
+
dirplot map . --legend
|
|
157
|
+
|
|
158
|
+
# Show a file-count legend limited to 10 entries
|
|
159
|
+
dirplot map . --legend 10
|
|
160
|
+
|
|
141
161
|
# Save as an interactive SVG (hover highlight + floating tooltip)
|
|
142
162
|
dirplot map . --output treemap.svg --no-show
|
|
143
163
|
|
|
@@ -153,14 +173,16 @@ dirplot map . --format svg --output treemap.svg --no-show
|
|
|
153
173
|
| `--format` | `-f` | auto | Output format: `png` or `svg`. Auto-detected from `--output` extension |
|
|
154
174
|
| `--show/--no-show` | | `--show` | Display the image after rendering |
|
|
155
175
|
| `--inline` | | off | Display in terminal (protocol auto-detected; PNG only) |
|
|
156
|
-
| `--legend
|
|
157
|
-
| `--font-size` |
|
|
176
|
+
| `--legend [N]` | | off | Show file-count legend; `N` sets max entries (default: 20) |
|
|
177
|
+
| `--font-size` | | `12` | Directory label font size in pixels |
|
|
158
178
|
| `--colormap` | `-c` | `tab20` | Matplotlib colormap for unknown extensions |
|
|
159
179
|
| `--exclude` | `-e` | — | Path to exclude (repeatable) |
|
|
180
|
+
| `--subtree` | `-s` | — | Show only this subtree of the root (repeatable); supports nested paths like `src/dirplot/fonts` |
|
|
160
181
|
| `--size` | | terminal size | Output dimensions as `WIDTHxHEIGHT` (e.g. `1920x1080`) |
|
|
161
182
|
| `--header/--no-header` | | `--header` | Print info lines before rendering |
|
|
162
183
|
| `--cushion/--no-cushion` | | `--cushion` | Apply van Wijk cushion shading for a raised 3-D look |
|
|
163
184
|
| `--log/--no-log` | | `--no-log` | Use log of file sizes for layout, making small files more visible |
|
|
185
|
+
| `--password` | | — | Password for encrypted archives; prompted interactively if not supplied and needed |
|
|
164
186
|
| `--github-token` | | `$GITHUB_TOKEN` | GitHub personal access token for private repos or higher rate limits |
|
|
165
187
|
|
|
166
188
|
## Inline Display
|
|
@@ -186,7 +208,7 @@ The default mode (`--show`, no `--inline`) opens the PNG in the system viewer (`
|
|
|
186
208
|
|
|
187
209
|
## Archives
|
|
188
210
|
|
|
189
|
-
dirplot can read local archive files
|
|
211
|
+
dirplot can read local archive files without unpacking them — zip, tar (gz/bz2/xz/zst), 7z, rar, and many more via libarchive (iso, cpio, rpm, cab, lha, xar, and all ZIP-based formats like jar, whl, apk, nupkg, vsix, ipa). See [ARCHIVES.md](docs/ARCHIVES.md) for the full list, dependencies, and platform notes.
|
|
190
212
|
|
|
191
213
|
```bash
|
|
192
214
|
dirplot map project.zip
|
|
@@ -210,6 +232,7 @@ pip install "dirplot[s3]" # AWS S3 via boto3
|
|
|
210
232
|
dirplot map ssh://alice@prod.example.com/var/www
|
|
211
233
|
dirplot map s3://noaa-ghcn-pds --no-sign
|
|
212
234
|
dirplot map github://pallets/flask
|
|
235
|
+
dirplot map github://torvalds/linux@v6.12/Documentation
|
|
213
236
|
dirplot map docker://my-container:/app
|
|
214
237
|
dirplot map pod://my-pod:/app
|
|
215
238
|
dirplot map pod://my-pod@staging:/app
|
|
@@ -234,6 +257,8 @@ To create a token: GitHub → Settings → Developer settings → Personal acces
|
|
|
234
257
|
|
|
235
258
|
## Python API
|
|
236
259
|
|
|
260
|
+
> **Note:** The programmatic Python API is still evolving and may change between releases without notice. Pin a specific version if you depend on it. The CLI interface is stable.
|
|
261
|
+
|
|
237
262
|
The public API is small — `build_tree`, `create_treemap`, `create_treemap_svg`, and the display helpers:
|
|
238
263
|
|
|
239
264
|
```python
|
|
@@ -23,9 +23,12 @@
|
|
|
23
23
|
- **SVG output** (`--format svg` or `--output file.svg`) produces a fully self-contained interactive file: CSS hover highlight, a JavaScript floating tooltip panel, and cushion shading via a gradient — no external dependencies.
|
|
24
24
|
- Display via system image viewer or inline in the terminal (iTerm2 and Kitty protocols, auto-detected).
|
|
25
25
|
- Save output to a PNG or SVG file with `--output`.
|
|
26
|
-
- Exclude paths with `--exclude` (repeatable).
|
|
26
|
+
- Exclude paths with `--exclude` (repeatable), or focus on specific subtrees with `--subtree` / `-s` (allowlist complement, supports nested paths like `src/dirplot/fonts`).
|
|
27
|
+
- Pass multiple local paths (`dirplot map src tests`) to scan each independently and display them under their common parent, ignoring all other siblings.
|
|
27
28
|
- Works on macOS, Linux, and Windows; WSL2 fully supported.
|
|
28
|
-
- Scan remote hosts over SSH (`pip install "dirplot[ssh]"`), AWS S3 buckets (`pip install "dirplot[s3]"`), any public/private GitHub repository, **running Docker containers**, or **Kubernetes pods** — all without extra dependencies beyond the respective CLI/SDK. See [EXAMPLES.md](docs/EXAMPLES.md).
|
|
29
|
+
- Scan remote hosts over SSH (`pip install "dirplot[ssh]"`), AWS S3 buckets (`pip install "dirplot[s3]"`), any public/private GitHub repository (including specific branch, tag, commit SHA, or subdirectory), **running Docker containers**, or **Kubernetes pods** — all without extra dependencies beyond the respective CLI/SDK. See [EXAMPLES.md](docs/EXAMPLES.md).
|
|
30
|
+
- Optional **file-count legend** (`--legend`) — a corner overlay listing the top extensions by number of files, with coloured swatches and counts, automatically sized to fit the image.
|
|
31
|
+
- **Wide archive support** — reads zip, tar (gz/bz2/xz/zst), 7z, rar, and via libarchive: iso, cpio, rpm, cab, lha/lzh, xar/pkg, a/ar, and all ZIP-based formats (jar, whl, apk, nupkg, vsix, ipa, …) as virtual directory trees without unpacking. Encrypted archives are handled gracefully: metadata-only reads work without a password for most formats; a password can be supplied with `--password` or entered interactively when needed.
|
|
29
32
|
|
|
30
33
|
## How It Works
|
|
31
34
|
|
|
@@ -83,6 +86,13 @@ dirplot map . --inline
|
|
|
83
86
|
# Exclude directories
|
|
84
87
|
dirplot map . --exclude .venv --exclude .git
|
|
85
88
|
|
|
89
|
+
# Map two specific subtrees under their common parent
|
|
90
|
+
dirplot map src tests
|
|
91
|
+
|
|
92
|
+
# Focus on named subtrees of a root (allowlist; supports nested paths)
|
|
93
|
+
dirplot map . --subtree src --subtree tests
|
|
94
|
+
dirplot map . --subtree src/dirplot/fonts
|
|
95
|
+
|
|
86
96
|
# Use a different colormap and larger directory labels
|
|
87
97
|
dirplot map . --colormap Set2 --font-size 18
|
|
88
98
|
|
|
@@ -92,6 +102,12 @@ dirplot map . --size 1920x1080 --output dirplot.png --no-show
|
|
|
92
102
|
# Don't apply cushion shading — makes tiles look flat
|
|
93
103
|
dirplot map . --no-cushion
|
|
94
104
|
|
|
105
|
+
# Show a file-count legend (top 20 extensions by default)
|
|
106
|
+
dirplot map . --legend
|
|
107
|
+
|
|
108
|
+
# Show a file-count legend limited to 10 entries
|
|
109
|
+
dirplot map . --legend 10
|
|
110
|
+
|
|
95
111
|
# Save as an interactive SVG (hover highlight + floating tooltip)
|
|
96
112
|
dirplot map . --output treemap.svg --no-show
|
|
97
113
|
|
|
@@ -107,14 +123,16 @@ dirplot map . --format svg --output treemap.svg --no-show
|
|
|
107
123
|
| `--format` | `-f` | auto | Output format: `png` or `svg`. Auto-detected from `--output` extension |
|
|
108
124
|
| `--show/--no-show` | | `--show` | Display the image after rendering |
|
|
109
125
|
| `--inline` | | off | Display in terminal (protocol auto-detected; PNG only) |
|
|
110
|
-
| `--legend
|
|
111
|
-
| `--font-size` |
|
|
126
|
+
| `--legend [N]` | | off | Show file-count legend; `N` sets max entries (default: 20) |
|
|
127
|
+
| `--font-size` | | `12` | Directory label font size in pixels |
|
|
112
128
|
| `--colormap` | `-c` | `tab20` | Matplotlib colormap for unknown extensions |
|
|
113
129
|
| `--exclude` | `-e` | — | Path to exclude (repeatable) |
|
|
130
|
+
| `--subtree` | `-s` | — | Show only this subtree of the root (repeatable); supports nested paths like `src/dirplot/fonts` |
|
|
114
131
|
| `--size` | | terminal size | Output dimensions as `WIDTHxHEIGHT` (e.g. `1920x1080`) |
|
|
115
132
|
| `--header/--no-header` | | `--header` | Print info lines before rendering |
|
|
116
133
|
| `--cushion/--no-cushion` | | `--cushion` | Apply van Wijk cushion shading for a raised 3-D look |
|
|
117
134
|
| `--log/--no-log` | | `--no-log` | Use log of file sizes for layout, making small files more visible |
|
|
135
|
+
| `--password` | | — | Password for encrypted archives; prompted interactively if not supplied and needed |
|
|
118
136
|
| `--github-token` | | `$GITHUB_TOKEN` | GitHub personal access token for private repos or higher rate limits |
|
|
119
137
|
|
|
120
138
|
## Inline Display
|
|
@@ -140,7 +158,7 @@ The default mode (`--show`, no `--inline`) opens the PNG in the system viewer (`
|
|
|
140
158
|
|
|
141
159
|
## Archives
|
|
142
160
|
|
|
143
|
-
dirplot can read local archive files
|
|
161
|
+
dirplot can read local archive files without unpacking them — zip, tar (gz/bz2/xz/zst), 7z, rar, and many more via libarchive (iso, cpio, rpm, cab, lha, xar, and all ZIP-based formats like jar, whl, apk, nupkg, vsix, ipa). See [ARCHIVES.md](docs/ARCHIVES.md) for the full list, dependencies, and platform notes.
|
|
144
162
|
|
|
145
163
|
```bash
|
|
146
164
|
dirplot map project.zip
|
|
@@ -164,6 +182,7 @@ pip install "dirplot[s3]" # AWS S3 via boto3
|
|
|
164
182
|
dirplot map ssh://alice@prod.example.com/var/www
|
|
165
183
|
dirplot map s3://noaa-ghcn-pds --no-sign
|
|
166
184
|
dirplot map github://pallets/flask
|
|
185
|
+
dirplot map github://torvalds/linux@v6.12/Documentation
|
|
167
186
|
dirplot map docker://my-container:/app
|
|
168
187
|
dirplot map pod://my-pod:/app
|
|
169
188
|
dirplot map pod://my-pod@staging:/app
|
|
@@ -188,6 +207,8 @@ To create a token: GitHub → Settings → Developer settings → Personal acces
|
|
|
188
207
|
|
|
189
208
|
## Python API
|
|
190
209
|
|
|
210
|
+
> **Note:** The programmatic Python API is still evolving and may change between releases without notice. Pin a specific version if you depend on it. The CLI interface is stable.
|
|
211
|
+
|
|
191
212
|
The public API is small — `build_tree`, `create_treemap`, `create_treemap_svg`, and the display helpers:
|
|
192
213
|
|
|
193
214
|
```python
|
|
Binary file
|
|
Binary file
|