dirplot 0.3.1__tar.gz → 0.3.3__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.1 → dirplot-0.3.3}/CHANGELOG.md +54 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/PKG-INFO +19 -3
- {dirplot-0.3.1 → dirplot-0.3.3}/README.md +17 -2
- dirplot-0.3.3/alpine-pod.png +0 -0
- dirplot-0.3.3/aws-lambda.png +0 -0
- dirplot-0.3.3/breadcrumbs_test.png +0 -0
- dirplot-0.3.3/demo.cast +418 -0
- dirplot-0.3.3/demo.yaml +26 -0
- dirplot-0.3.3/demo.yaml~ +16 -0
- dirplot-0.3.3/demo1.cast +414 -0
- dirplot-0.3.3/docs/docker.png +0 -0
- dirplot-0.3.3/docs/fastapi.png +0 -0
- dirplot-0.3.3/docs/flask.png +0 -0
- dirplot-0.3.3/docs/k8s.png +0 -0
- dirplot-0.3.3/docs/pypy.png +0 -0
- dirplot-0.3.3/docs/python.png +0 -0
- dirplot-0.3.3/docs/s3.png +0 -0
- dirplot-0.3.3/foo.svg +158 -0
- dirplot-0.3.3/gen_asciicast.py +306 -0
- dirplot-0.3.3/misc/scan/FILE-SCANNING.md +72 -0
- dirplot-0.3.3/misc/scan/compare.py +58 -0
- dirplot-0.3.3/misc/scan/scan_async.py +93 -0
- dirplot-0.3.3/misc/scan/scan_dir.py +66 -0
- dirplot-0.3.3/misc/scan/scan_rust.py +33 -0
- dirplot-0.3.3/misc/scan/scan_threaded.py +90 -0
- dirplot-0.3.3/misc/scan/scan_walk.py +46 -0
- dirplot-0.3.3/misc/watch/foo.txt +2 -0
- dirplot-0.3.3/misc/watch/watch_dir.py +72 -0
- dirplot-0.3.3/misc/watch/wordcloud1.png +0 -0
- dirplot-0.3.3/misc-watched.png +0 -0
- dirplot-0.3.3/openclaw.png +0 -0
- dirplot-0.3.3/pg.png +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/pyproject.toml +3 -1
- dirplot-0.3.3/scripts/animate_demo.py +121 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/scripts/make_docs_images.sh +1 -1
- {dirplot-0.3.1 → dirplot-0.3.3}/src/dirplot/docker.py +1 -1
- {dirplot-0.3.1 → dirplot-0.3.3}/src/dirplot/k8s.py +11 -1
- {dirplot-0.3.1 → dirplot-0.3.3}/src/dirplot/main.py +274 -17
- {dirplot-0.3.1 → dirplot-0.3.3}/src/dirplot/render.py +132 -19
- dirplot-0.3.3/src/dirplot/scanner.py +228 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/src/dirplot/svg_render.py +48 -7
- dirplot-0.3.3/src/dirplot/watch.py +168 -0
- dirplot-0.3.3/src-portrait.png +0 -0
- dirplot-0.3.3/src.pdf +0 -0
- dirplot-0.3.3/src.png +0 -0
- dirplot-0.3.3/src.svg +382 -0
- dirplot-0.3.3/test-animation.png +0 -0
- dirplot-0.3.3/tests/animation/README.md +3 -0
- dirplot-0.3.3/tests/animation/changelog.txt +1 -0
- dirplot-0.3.3/tests/animation/config.toml +3 -0
- dirplot-0.3.3/tests/animation/data/records.csv +4 -0
- dirplot-0.3.3/tests/animation/data/schema_v1.json +1 -0
- dirplot-0.3.3/tests/animation/src/lib/parser.py +2 -0
- dirplot-0.3.3/tests/animation/src/main.py +7 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/test_cli.py +79 -3
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/test_render.py +52 -1
- dirplot-0.3.3/tests/test_scanner.py +309 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/test_svg_render.py +49 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/uv.lock +35 -1
- dirplot-0.3.1/docs/docker.png +0 -0
- dirplot-0.3.1/docs/fastapi.png +0 -0
- dirplot-0.3.1/docs/flask.png +0 -0
- dirplot-0.3.1/docs/k8s.png +0 -0
- dirplot-0.3.1/docs/pypy.png +0 -0
- dirplot-0.3.1/docs/python.png +0 -0
- dirplot-0.3.1/docs/s3.png +0 -0
- dirplot-0.3.1/src/dirplot/scanner.py +0 -110
- dirplot-0.3.1/src.svg +0 -370
- dirplot-0.3.1/tests/test_scanner.py +0 -140
- {dirplot-0.3.1 → dirplot-0.3.3}/.claude/settings.local.json +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/.dockerignore +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/.github/dependabot.yml +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/.github/workflows/ci.yml +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/.github/workflows/publish.yml +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/.gitignore +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/.ipynb_checkpoints/Untitled-checkpoint.ipynb +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/.pre-commit-config.yaml +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/.python-version +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/CONTRIBUTING.md +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/Dockerfile +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/LICENSE +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/Makefile +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/SECURITY.md +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/TASKS.md~ +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/docs/ARCHIVES.md +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/docs/EXAMPLES.md +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/docs/SSH_DESIGN.md +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/docs/dirplot.png +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/scripts/make_fixtures.py +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/scripts/open_terminals.sh +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/src/dirplot/__init__.py +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/src/dirplot/__main__.py +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/src/dirplot/archives.py +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/src/dirplot/colors.py +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/src/dirplot/display.py +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/src/dirplot/fonts/JetBrainsMono-Bold.ttf +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/src/dirplot/fonts/JetBrainsMono-BoldItalic.ttf +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/src/dirplot/fonts/JetBrainsMono-Italic.ttf +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/src/dirplot/fonts/JetBrainsMono-Regular.ttf +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/src/dirplot/fonts/OFL.txt +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/src/dirplot/github.py +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/src/dirplot/py.typed +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/src/dirplot/s3.py +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/src/dirplot/ssh.py +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/src/dirplot/terminal.py +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/__init__.py +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/conftest.py +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/example/bar/bar.py +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/example/bar/baz.json +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/example/foo/foo.md +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/fixtures/sample.7z +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/fixtures/sample.a +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/fixtures/sample.aab +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/fixtures/sample.apk +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/fixtures/sample.cpio +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/fixtures/sample.ear +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/fixtures/sample.epub +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/fixtures/sample.ipa +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/fixtures/sample.iso +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/fixtures/sample.jar +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/fixtures/sample.nupkg +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/fixtures/sample.rar +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/fixtures/sample.tar +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/fixtures/sample.tar.bz2 +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/fixtures/sample.tar.gz +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/fixtures/sample.tar.xz +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/fixtures/sample.tar.zst +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/fixtures/sample.tbz2 +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/fixtures/sample.tgz +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/fixtures/sample.txz +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/fixtures/sample.tzst +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/fixtures/sample.vsix +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/fixtures/sample.war +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/fixtures/sample.whl +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/fixtures/sample.xar +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/fixtures/sample.xpi +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/fixtures/sample.zip +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/test_archives.py +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/test_colors.py +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/test_display.py +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/test_docker.py +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/test_drawing.py +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/test_github.py +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/test_k8s.py +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/test_s3.py +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/test_ssh.py +0 -0
- {dirplot-0.3.1 → dirplot-0.3.3}/tests/test_terminal.py +0 -0
|
@@ -7,6 +7,60 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.3.3] - 2026-03-14
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **Breadcrumbs mode** (`--breadcrumbs/--no-breadcrumbs`, `-b/-B`, on by default): directories
|
|
15
|
+
that form a single-child chain (one subdirectory, no files) are collapsed into a single tile
|
|
16
|
+
whose header shows the full path separated by ` / ` (e.g. `src / dirplot / fonts`). When the
|
|
17
|
+
label is too wide, middle segments are replaced with `…` (`src / … / fonts`). The root tile
|
|
18
|
+
is never collapsed. Disable with `-B` or `--no-breadcrumbs`.
|
|
19
|
+
- **Tree depth in root label**: the root tile header now includes `depth: N` alongside the
|
|
20
|
+
file, directory, and size summary (e.g. `myproject — 124 files, 18 dirs, 4.0 MB (…), depth: 6`).
|
|
21
|
+
The depth reflects the original tree structure and is invariant to whether breadcrumbs mode
|
|
22
|
+
is active.
|
|
23
|
+
|
|
24
|
+
## [0.3.2] - 2026-03-13
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- **`dirplot watch`** subcommand — watches a directory and regenerates the treemap
|
|
29
|
+
on every file-system change using watchdog (FSEvents on macOS, inotify on Linux,
|
|
30
|
+
kqueue on BSD). Requires `watchdog`, now a core dependency.
|
|
31
|
+
```bash
|
|
32
|
+
dirplot watch . --output treemap.png
|
|
33
|
+
dirplot watch . --output treemap.png --animate # APNG, one frame per change
|
|
34
|
+
```
|
|
35
|
+
- **Vertical file labels**: file tiles that are at least twice as tall as wide now
|
|
36
|
+
display their label rotated 90° CCW, letting the text span the full tile height
|
|
37
|
+
instead of being squeezed into the narrow width.
|
|
38
|
+
- **Scan and render timing** shown in header output:
|
|
39
|
+
`Found 1,414 files … [2.3s]` and `Saved dirplot to out.png [0.4s]`.
|
|
40
|
+
- **Multiple local roots**: `dirplot map src tests` accepts two or more local
|
|
41
|
+
directory paths, finds their common parent, and shows only those subtrees.
|
|
42
|
+
- **`--subtree` / `-s`** option (repeatable) — allowlist complement to `--exclude`:
|
|
43
|
+
keep only the named direct children of the root after scanning. Supports nested
|
|
44
|
+
paths such as `--subtree src/dirplot/fonts`.
|
|
45
|
+
|
|
46
|
+
### Fixed
|
|
47
|
+
|
|
48
|
+
- `--exclude` on pod and Docker backends now prunes entire subtrees — previously only
|
|
49
|
+
the exact path was matched, so all children leaked through.
|
|
50
|
+
- Clearer error for distroless pods: exit code 126 from `kubectl exec` now surfaces as
|
|
51
|
+
an actionable message explaining that the container has no shell or `find` utility.
|
|
52
|
+
- Adaptive file-label font size is now computed with a single `textbbox` measurement
|
|
53
|
+
(one call per tile) instead of stepping down one pixel at a time — eliminates an
|
|
54
|
+
O(font_size × n_tiles) bottleneck that caused near-blocking on large trees such as
|
|
55
|
+
`.venv` directories.
|
|
56
|
+
|
|
57
|
+
### Changed
|
|
58
|
+
|
|
59
|
+
- `-s` short alias reassigned from `--font-size` to `--subtree`. `--font-size` still
|
|
60
|
+
works as before; it just no longer has a single-letter alias.
|
|
61
|
+
|
|
62
|
+
## [0.3.1] - 2026-03-11
|
|
63
|
+
|
|
10
64
|
### Added
|
|
11
65
|
|
|
12
66
|
- `github://` URI now accepts an optional subpath after the repository name, letting
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dirplot
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
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
|
|
@@ -33,6 +33,7 @@ Requires-Dist: py7zr>=0.20
|
|
|
33
33
|
Requires-Dist: rarfile>=4.0
|
|
34
34
|
Requires-Dist: squarify>=0.4
|
|
35
35
|
Requires-Dist: typer>=0.9
|
|
36
|
+
Requires-Dist: watchdog>=6.0.0
|
|
36
37
|
Provides-Extra: dev
|
|
37
38
|
Requires-Dist: mypy>=1.10; extra == 'dev'
|
|
38
39
|
Requires-Dist: pre-commit>=3.0; extra == 'dev'
|
|
@@ -72,10 +73,13 @@ Description-Content-Type: text/markdown
|
|
|
72
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.
|
|
73
74
|
- Display via system image viewer or inline in the terminal (iTerm2 and Kitty protocols, auto-detected).
|
|
74
75
|
- Save output to a PNG or SVG file with `--output`.
|
|
75
|
-
- 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.
|
|
76
78
|
- Works on macOS, Linux, and Windows; WSL2 fully supported.
|
|
77
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).
|
|
78
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
|
+
- **Breadcrumbs mode** (on by default) — single-child directory chains are collapsed into one tile with a `foo / bar / baz` header label. Middle segments are replaced with `…` when the tile is too narrow. Disable with `-B` / `--no-breadcrumbs`.
|
|
82
|
+
- **Tree depth** shown in the root tile header alongside the file count and total size (e.g. `myproject — 124 files, 18 dirs, 4.0 MB (…), depth: 6`).
|
|
79
83
|
- **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.
|
|
80
84
|
|
|
81
85
|
## How It Works
|
|
@@ -134,6 +138,13 @@ dirplot map . --inline
|
|
|
134
138
|
# Exclude directories
|
|
135
139
|
dirplot map . --exclude .venv --exclude .git
|
|
136
140
|
|
|
141
|
+
# Map two specific subtrees under their common parent
|
|
142
|
+
dirplot map src tests
|
|
143
|
+
|
|
144
|
+
# Focus on named subtrees of a root (allowlist; supports nested paths)
|
|
145
|
+
dirplot map . --subtree src --subtree tests
|
|
146
|
+
dirplot map . --subtree src/dirplot/fonts
|
|
147
|
+
|
|
137
148
|
# Use a different colormap and larger directory labels
|
|
138
149
|
dirplot map . --colormap Set2 --font-size 18
|
|
139
150
|
|
|
@@ -149,6 +160,9 @@ dirplot map . --legend
|
|
|
149
160
|
# Show a file-count legend limited to 10 entries
|
|
150
161
|
dirplot map . --legend 10
|
|
151
162
|
|
|
163
|
+
# Disable breadcrumbs (show full nested hierarchy instead of collapsed chains)
|
|
164
|
+
dirplot map . -B
|
|
165
|
+
|
|
152
166
|
# Save as an interactive SVG (hover highlight + floating tooltip)
|
|
153
167
|
dirplot map . --output treemap.svg --no-show
|
|
154
168
|
|
|
@@ -165,13 +179,15 @@ dirplot map . --format svg --output treemap.svg --no-show
|
|
|
165
179
|
| `--show/--no-show` | | `--show` | Display the image after rendering |
|
|
166
180
|
| `--inline` | | off | Display in terminal (protocol auto-detected; PNG only) |
|
|
167
181
|
| `--legend [N]` | | off | Show file-count legend; `N` sets max entries (default: 20) |
|
|
168
|
-
| `--font-size` |
|
|
182
|
+
| `--font-size` | | `12` | Directory label font size in pixels |
|
|
169
183
|
| `--colormap` | `-c` | `tab20` | Matplotlib colormap for unknown extensions |
|
|
170
184
|
| `--exclude` | `-e` | — | Path to exclude (repeatable) |
|
|
185
|
+
| `--subtree` | `-s` | — | Show only this subtree of the root (repeatable); supports nested paths like `src/dirplot/fonts` |
|
|
171
186
|
| `--size` | | terminal size | Output dimensions as `WIDTHxHEIGHT` (e.g. `1920x1080`) |
|
|
172
187
|
| `--header/--no-header` | | `--header` | Print info lines before rendering |
|
|
173
188
|
| `--cushion/--no-cushion` | | `--cushion` | Apply van Wijk cushion shading for a raised 3-D look |
|
|
174
189
|
| `--log/--no-log` | | `--no-log` | Use log of file sizes for layout, making small files more visible |
|
|
190
|
+
| `--breadcrumbs/--no-breadcrumbs` | `-b`/`-B` | `--breadcrumbs` | Collapse single-child directory chains into `foo / bar / baz` labels |
|
|
175
191
|
| `--password` | | — | Password for encrypted archives; prompted interactively if not supplied and needed |
|
|
176
192
|
| `--github-token` | | `$GITHUB_TOKEN` | GitHub personal access token for private repos or higher rate limits |
|
|
177
193
|
|
|
@@ -23,10 +23,13 @@
|
|
|
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
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).
|
|
29
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
|
+
- **Breadcrumbs mode** (on by default) — single-child directory chains are collapsed into one tile with a `foo / bar / baz` header label. Middle segments are replaced with `…` when the tile is too narrow. Disable with `-B` / `--no-breadcrumbs`.
|
|
32
|
+
- **Tree depth** shown in the root tile header alongside the file count and total size (e.g. `myproject — 124 files, 18 dirs, 4.0 MB (…), depth: 6`).
|
|
30
33
|
- **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.
|
|
31
34
|
|
|
32
35
|
## How It Works
|
|
@@ -85,6 +88,13 @@ dirplot map . --inline
|
|
|
85
88
|
# Exclude directories
|
|
86
89
|
dirplot map . --exclude .venv --exclude .git
|
|
87
90
|
|
|
91
|
+
# Map two specific subtrees under their common parent
|
|
92
|
+
dirplot map src tests
|
|
93
|
+
|
|
94
|
+
# Focus on named subtrees of a root (allowlist; supports nested paths)
|
|
95
|
+
dirplot map . --subtree src --subtree tests
|
|
96
|
+
dirplot map . --subtree src/dirplot/fonts
|
|
97
|
+
|
|
88
98
|
# Use a different colormap and larger directory labels
|
|
89
99
|
dirplot map . --colormap Set2 --font-size 18
|
|
90
100
|
|
|
@@ -100,6 +110,9 @@ dirplot map . --legend
|
|
|
100
110
|
# Show a file-count legend limited to 10 entries
|
|
101
111
|
dirplot map . --legend 10
|
|
102
112
|
|
|
113
|
+
# Disable breadcrumbs (show full nested hierarchy instead of collapsed chains)
|
|
114
|
+
dirplot map . -B
|
|
115
|
+
|
|
103
116
|
# Save as an interactive SVG (hover highlight + floating tooltip)
|
|
104
117
|
dirplot map . --output treemap.svg --no-show
|
|
105
118
|
|
|
@@ -116,13 +129,15 @@ dirplot map . --format svg --output treemap.svg --no-show
|
|
|
116
129
|
| `--show/--no-show` | | `--show` | Display the image after rendering |
|
|
117
130
|
| `--inline` | | off | Display in terminal (protocol auto-detected; PNG only) |
|
|
118
131
|
| `--legend [N]` | | off | Show file-count legend; `N` sets max entries (default: 20) |
|
|
119
|
-
| `--font-size` |
|
|
132
|
+
| `--font-size` | | `12` | Directory label font size in pixels |
|
|
120
133
|
| `--colormap` | `-c` | `tab20` | Matplotlib colormap for unknown extensions |
|
|
121
134
|
| `--exclude` | `-e` | — | Path to exclude (repeatable) |
|
|
135
|
+
| `--subtree` | `-s` | — | Show only this subtree of the root (repeatable); supports nested paths like `src/dirplot/fonts` |
|
|
122
136
|
| `--size` | | terminal size | Output dimensions as `WIDTHxHEIGHT` (e.g. `1920x1080`) |
|
|
123
137
|
| `--header/--no-header` | | `--header` | Print info lines before rendering |
|
|
124
138
|
| `--cushion/--no-cushion` | | `--cushion` | Apply van Wijk cushion shading for a raised 3-D look |
|
|
125
139
|
| `--log/--no-log` | | `--no-log` | Use log of file sizes for layout, making small files more visible |
|
|
140
|
+
| `--breadcrumbs/--no-breadcrumbs` | `-b`/`-B` | `--breadcrumbs` | Collapse single-child directory chains into `foo / bar / baz` labels |
|
|
126
141
|
| `--password` | | — | Password for encrypted archives; prompted interactively if not supplied and needed |
|
|
127
142
|
| `--github-token` | | `$GITHUB_TOKEN` | GitHub personal access token for private repos or higher rate limits |
|
|
128
143
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|