Skip to content

v0.3.1

Choose a tag to compare

@deeplook deeplook released this 11 Mar 17:07
· 232 commits to main since this release

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 branch
    • github://owner/repo@ref/sub/path — subpath on a specific branch, tag, or commit SHA
    • https://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 N replaces the old boolean --legend/--no-legend flag. 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 --legend alone to use the default of 20 entries.
    • Pass --legend 10 for 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.
  • 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-c core 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 / .tzst routed through libarchive for consistent behaviour across all
      supported Python versions (stdlib tarfile only gained zstd support in 3.12).
    • libarchive-c>=5.0 added as a core dependency alongside py7zr and rarfile.
      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).
  • Encrypted archive handling:

    • --password CLI 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.
    • PasswordRequired exception exported from dirplot.archives for 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 raises PasswordRequired.

Fixed

  • --version moved back to the top-level dirplot command (was accidentally scoped
    to dirplot map after the CLI was restructured into subcommands).