v0.3.1
Added
-
github://URI now accepts an optional subpath after the repository name, letting
you scan a subdirectory directly:github://owner/repo/sub/path— subpath on the default branchgithub://owner/repo@ref/sub/path— subpath on a specific branch, tag, or commit SHAhttps://github.com/owner/repo/tree/branch/sub/path— full GitHub URL form- Tags and commit SHAs are supported wherever a branch ref was previously accepted
(e.g.github://torvalds/linux@v6.12), as the GitHub trees API accepts any git ref.
-
--legend Nreplaces the old boolean--legend/--no-legendflag. It now shows a
file-count legend — a sorted list of the top N extensions by number of files,
with a coloured swatch and the file count for each entry:- Pass
--legendalone to use the default of 20 entries. - Pass
--legend 10for a custom limit. - Omit the flag entirely to show no legend.
- The number of rows is also capped automatically so the box never overflows the
image, based on available vertical space and the current--font-size. - Extensions with the same count are sorted alphabetically as a tiebreaker.
- When the total number of extensions exceeds the limit, a
(+N more)line is
appended at the bottom of the box.
- Pass
-
The root tile header now includes a summary of the scanned tree after an em-dash
separator:myproject — 124 files, 18 dirs, 4.0 MB (4,231,680 bytes).
Applies to both PNG and SVG output. The label is truncated with…when the tile
is too narrow to fit the full string. -
Greatly expanded archive format support via the new
libarchive-ccore dependency
(wraps the system libarchive C library):- New formats:
.iso,.cpio,.xar,.pkg,.dmg,.img,.rpm,.cab,
.lha,.lzh,.a,.ar,.tar.zst,.tzst - New ZIP aliases:
.nupkg(NuGet),.vsix(VS Code extension),.ipa(iOS app),
.aab(Android App Bundle) .tar.zst/.tzstrouted through libarchive for consistent behaviour across all
supported Python versions (stdlibtarfileonly gained zstd support in 3.12).libarchive-c>=5.0added as a core dependency alongsidepy7zrandrarfile.
Requires the system libarchive library:
brew install libarchive/apt install libarchive-dev.- See ARCHIVES.md for the full format table, platform notes, and
intentionally unsupported formats (.deb, UDIF.dmg).
- New formats:
-
Encrypted archive handling:
--passwordCLI option passes a passphrase upfront.- If an archive turns out to be encrypted and no password was given, dirplot prompts
interactively (Password:hidden-input prompt) and retries — no need to re-run with a flag. - A wrong password exits cleanly with
Error: incorrect password. PasswordRequiredexception exported fromdirplot.archivesfor programmatic use.- Encryption behaviour by format (since dirplot reads metadata only, never extracts):
- ZIP and 7z: central directory / file list is unencrypted by default → readable without
a password even for encrypted archives. - RAR with header encryption (
-hp): listing is hidden without password;
wrong password raisesPasswordRequired.
- ZIP and 7z: central directory / file list is unencrypted by default → readable without
Fixed
--versionmoved back to the top-leveldirplotcommand (was accidentally scoped
todirplot mapafter the CLI was restructured into subcommands).