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.4.tar.gz
(4.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dirview-0.1.4.tar.gz.
File metadata
- Download URL: dirview-0.1.4.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8da86bcd6357b2519f07f8b0999e30e8d368cd1d11a9574ed1ebb6e03424aaf
|
|
| MD5 |
d492b1dbefcea71b70b05e5d910203e8
|
|
| BLAKE2b-256 |
0c2d0176d8220589f1d017c5c87f4ea25da7456ea482bf32299fad58f633dc79
|
File details
Details for the file dirview-0.1.4-py3-none-any.whl.
File metadata
- Download URL: dirview-0.1.4-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce3e7dc42bdc41aa8cb2300d2416c2f8965363ce6c91290a234fc8f618d59186
|
|
| MD5 |
5ef2b05d8903a31ea20e44bf43f3c613
|
|
| BLAKE2b-256 |
f3328869b661de563ba2816834deb493ad7ecefd12cc77c88b91b12b27ea0a3b
|