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

Uploaded Python 3

File details

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

File metadata

  • Download URL: dirview-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 a470e44464337a327c4e5fbc80b643cdd2fbf0f6f162b1f2c14b5653bdc92939
MD5 a9d24755ab82914feb788e482abb85e1
BLAKE2b-256 65e60a0cfb3d82b1adf1cb7b80c49799d732f4221d985f9e13442dd7da9a4b13

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dirview-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e9ba6a623045f3911e4b917bae9b05bc5e8710c58a4b3aa02c66002ab76628ba
MD5 6abd17983412d67819ec635af1a8f112
BLAKE2b-256 7f98d4825ff9e972f7b49b2dbcc1e7359ac0851d5e0639c99a47670e85b601f3

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