Skip to main content

A simple directory tree display tool

Project description

DirTree

一个简单易用的目录树显示工具。

功能特点

  • 显示目录的树形结构
  • 支持排除指定目录
  • 可以限制显示深度
  • 可以显示文件大小
  • 支持彩色输出和文件/文件夹图标
  • 显示统计信息(目录数、文件数、总大小)

安装

pip install dirview

使用方法

基本用法:

dirtree [路径] [选项]

选项说明:

  • -h, --help: 显示帮助信息
  • -e, --exclude: 要排除的目录列表 (例如: -e node_modules .git)
  • -L, --level: 最大显示深度 (例如: -L 2)
  • -s, --size: 显示文件大小
  • --version: 显示版本信息

使用示例:

# 显示当前目录的树结构
dirtree

# 显示指定目录的树结构
dirtree /path/to/directory

# 显示当前目录的树结构及文件大小
dirtree -s

# 只显示两层深度的目录结构
dirtree -L 2

# 排除指定目录
dirtree -e .git node_modules

输出示例:

目录树 for /your/project/path
==================================================
├── 📁 src/
   ├── 📄 main.py
   └── 📄 __init__.py
├── 📄 README.md
└── 📄 pyproject.toml

统计信息:
目录数: 1
文件数: 3
总大小: 2.5KB

默认排除的目录

工具默认会排除以下目录:

  • .git
  • pycache
  • node_modules
  • langchain-env

许可证

MIT License

作者

陈定钢 (945036663@qq.com)

贡献

欢迎提交 Issue 和 Pull Request!

更新历史

0.1.1

  • 初始发布
  • 实现基本的目录树显示功能
  • 添加文件大小显示功能
  • 添加目录排除功能
  • 添加深度限制功能

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dirview-0.1.3.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dirview-0.1.3-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file dirview-0.1.3.tar.gz.

File metadata

  • Download URL: dirview-0.1.3.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for dirview-0.1.3.tar.gz
Algorithm Hash digest
SHA256 5c93e3ab96c40ec34f689ba00be3d74fd1f12da84b26dd9a1390684af57146cc
MD5 9d2c1dcab16ace836802c5f1b6839858
BLAKE2b-256 fa442b98f1790a95200b04715911f9b103b507212e6c69518ff5d47213a3c882

See more details on using hashes here.

File details

Details for the file dirview-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: dirview-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for dirview-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7eb656cabd93fad5fd0fde5bb9a261ce23ddfa28719abad2cb0fbc84a00cead2
MD5 483a642d3536fbce1907d0490aec159e
BLAKE2b-256 02061a52fb52bb13eda449a89da4cc815a20939cb42f2f420f4d53dbd7fe729d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page