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.1.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.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dirview-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 501d0ebb7b7aba4e0700573200a0da08467b4b05521aa21f44e731273b1536f1
MD5 260ccda0bcbd005f758058983f8cf58b
BLAKE2b-256 d9e815bec0ad276b73e07628688e1c953fdb34fb5e83234177f530258dd18ac1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dirview-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3fadd7ecafd3e06a6ecb38652453c80f8f774098ae08839bf732e46fa9644699
MD5 9ec5fb09fb3f132adb978518d3c212a8
BLAKE2b-256 c5845ff9568b53bb4eda0c8d1bf8bcd97bb16bbdb800d1015c4fa7cb11eb13cb

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