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.5.tar.gz
(5.3 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.5.tar.gz.
File metadata
- Download URL: dirview-0.1.5.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dadf742832b4ac6bd79a90e92e16c5a6ea4a87f7c064183014ac6301a97040ae
|
|
| MD5 |
d4aae09f45d80db2e52c0fdb8c8f656c
|
|
| BLAKE2b-256 |
1f3c8ea8378d4369d3bfd5ada85173607796a38b463377b1d49bd203e6e0d15c
|
File details
Details for the file dirview-0.1.5-py3-none-any.whl.
File metadata
- Download URL: dirview-0.1.5-py3-none-any.whl
- Upload date:
- Size: 5.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 |
36f3911a6fc01c785e5c838eb23d796a86b8ea5bd8d5babccb9cea8b859393cd
|
|
| MD5 |
27ee7a5e64ed9a43d0976b5e0758ac95
|
|
| BLAKE2b-256 |
82a75e436c2d58697e517d8e9a70c8f95147c68557f6fce8195a2e2192e90a75
|