directory-tree-printer 0.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- directory_tree_printer-0.4.1/.github/workflows/release.yml +50 -0
- directory_tree_printer-0.4.1/.github/workflows/tests.yml +35 -0
- directory_tree_printer-0.4.1/.gitignore +220 -0
- directory_tree_printer-0.4.1/CHANGELOG.md +56 -0
- directory_tree_printer-0.4.1/LICENSE +21 -0
- directory_tree_printer-0.4.1/PKG-INFO +340 -0
- directory_tree_printer-0.4.1/README.md +311 -0
- directory_tree_printer-0.4.1/directory_tree_printer.egg-info/PKG-INFO +340 -0
- directory_tree_printer-0.4.1/directory_tree_printer.egg-info/SOURCES.txt +31 -0
- directory_tree_printer-0.4.1/directory_tree_printer.egg-info/dependency_links.txt +1 -0
- directory_tree_printer-0.4.1/directory_tree_printer.egg-info/entry_points.txt +3 -0
- directory_tree_printer-0.4.1/directory_tree_printer.egg-info/requires.txt +9 -0
- directory_tree_printer-0.4.1/directory_tree_printer.egg-info/scm_file_list.json +27 -0
- directory_tree_printer-0.4.1/directory_tree_printer.egg-info/scm_version.json +8 -0
- directory_tree_printer-0.4.1/directory_tree_printer.egg-info/top_level.txt +1 -0
- directory_tree_printer-0.4.1/images/themeImage1.png +0 -0
- directory_tree_printer-0.4.1/main.py +3 -0
- directory_tree_printer-0.4.1/pyproject.toml +65 -0
- directory_tree_printer-0.4.1/requirements-dev.txt +4 -0
- directory_tree_printer-0.4.1/setup.cfg +4 -0
- directory_tree_printer-0.4.1/tests/__init__.py +0 -0
- directory_tree_printer-0.4.1/tests/test_cli.py +92 -0
- directory_tree_printer-0.4.1/tests/test_formatter.py +125 -0
- directory_tree_printer-0.4.1/tests/test_printer.py +128 -0
- directory_tree_printer-0.4.1/tree_printer/__init__.py +8 -0
- directory_tree_printer-0.4.1/tree_printer/cli.py +145 -0
- directory_tree_printer-0.4.1/tree_printer/config.py +16 -0
- directory_tree_printer-0.4.1/tree_printer/file_types.py +19 -0
- directory_tree_printer-0.4.1/tree_printer/formatter.py +86 -0
- directory_tree_printer-0.4.1/tree_printer/icons.py +21 -0
- directory_tree_printer-0.4.1/tree_printer/models.py +8 -0
- directory_tree_printer-0.4.1/tree_printer/printer.py +129 -0
- directory_tree_printer-0.4.1/tree_printer/themes.py +154 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
id-token: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
release:
|
|
14
|
+
name: Build, Release and Publish
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout repository
|
|
19
|
+
uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.12"
|
|
25
|
+
|
|
26
|
+
- name: Upgrade pip
|
|
27
|
+
run: python -m pip install --upgrade pip
|
|
28
|
+
|
|
29
|
+
- name: Install package and development dependencies
|
|
30
|
+
run: pip install -e ".[dev]"
|
|
31
|
+
|
|
32
|
+
- name: Run tests
|
|
33
|
+
run: pytest
|
|
34
|
+
|
|
35
|
+
- name: Build distributions
|
|
36
|
+
run: python -m build
|
|
37
|
+
|
|
38
|
+
- name: Verify distributions
|
|
39
|
+
run: python -m twine check dist/*
|
|
40
|
+
|
|
41
|
+
- name: Create GitHub Release
|
|
42
|
+
uses: softprops/action-gh-release@v2
|
|
43
|
+
with:
|
|
44
|
+
generate_release_notes: true
|
|
45
|
+
files: |
|
|
46
|
+
dist/*.whl
|
|
47
|
+
dist/*.tar.gz
|
|
48
|
+
|
|
49
|
+
- name: Publish package to PyPI
|
|
50
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
name: Python ${{ matrix.python-version }}
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
strategy:
|
|
15
|
+
fail-fast: false
|
|
16
|
+
matrix:
|
|
17
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- name: Checkout repository
|
|
21
|
+
uses: actions/checkout@v4
|
|
22
|
+
|
|
23
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
24
|
+
uses: actions/setup-python@v5
|
|
25
|
+
with:
|
|
26
|
+
python-version: ${{ matrix.python-version }}
|
|
27
|
+
|
|
28
|
+
- name: Upgrade pip
|
|
29
|
+
run: python -m pip install --upgrade pip
|
|
30
|
+
|
|
31
|
+
- name: Install package and development dependencies
|
|
32
|
+
run: pip install -e ".[dev]"
|
|
33
|
+
|
|
34
|
+
- name: Run tests
|
|
35
|
+
run: pytest
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
# Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
# poetry.lock
|
|
109
|
+
# poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
# pdm.lock
|
|
116
|
+
# pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
# pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# Redis
|
|
135
|
+
*.rdb
|
|
136
|
+
*.aof
|
|
137
|
+
*.pid
|
|
138
|
+
|
|
139
|
+
# RabbitMQ
|
|
140
|
+
mnesia/
|
|
141
|
+
rabbitmq/
|
|
142
|
+
rabbitmq-data/
|
|
143
|
+
|
|
144
|
+
# ActiveMQ
|
|
145
|
+
activemq-data/
|
|
146
|
+
|
|
147
|
+
# SageMath parsed files
|
|
148
|
+
*.sage.py
|
|
149
|
+
|
|
150
|
+
# Environments
|
|
151
|
+
.env
|
|
152
|
+
.envrc
|
|
153
|
+
.venv
|
|
154
|
+
env/
|
|
155
|
+
venv/
|
|
156
|
+
ENV/
|
|
157
|
+
env.bak/
|
|
158
|
+
venv.bak/
|
|
159
|
+
test-env
|
|
160
|
+
final-test-env
|
|
161
|
+
|
|
162
|
+
# Spyder project settings
|
|
163
|
+
.spyderproject
|
|
164
|
+
.spyproject
|
|
165
|
+
|
|
166
|
+
# Rope project settings
|
|
167
|
+
.ropeproject
|
|
168
|
+
|
|
169
|
+
# mkdocs documentation
|
|
170
|
+
/site
|
|
171
|
+
|
|
172
|
+
# mypy
|
|
173
|
+
.mypy_cache/
|
|
174
|
+
.dmypy.json
|
|
175
|
+
dmypy.json
|
|
176
|
+
|
|
177
|
+
# Pyre type checker
|
|
178
|
+
.pyre/
|
|
179
|
+
|
|
180
|
+
# pytype static type analyzer
|
|
181
|
+
.pytype/
|
|
182
|
+
|
|
183
|
+
# Cython debug symbols
|
|
184
|
+
cython_debug/
|
|
185
|
+
|
|
186
|
+
# PyCharm
|
|
187
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
188
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
189
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
190
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
191
|
+
# .idea/
|
|
192
|
+
|
|
193
|
+
# Abstra
|
|
194
|
+
# Abstra is an AI-powered process automation framework.
|
|
195
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
196
|
+
# Learn more at https://abstra.io/docs
|
|
197
|
+
.abstra/
|
|
198
|
+
|
|
199
|
+
# Visual Studio Code
|
|
200
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
201
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
202
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
203
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
204
|
+
# .vscode/
|
|
205
|
+
# Temporary file for partial code execution
|
|
206
|
+
tempCodeRunnerFile.py
|
|
207
|
+
|
|
208
|
+
# Ruff stuff:
|
|
209
|
+
.ruff_cache/
|
|
210
|
+
|
|
211
|
+
# PyPI configuration file
|
|
212
|
+
.pypirc
|
|
213
|
+
|
|
214
|
+
# Marimo
|
|
215
|
+
marimo/_static/
|
|
216
|
+
marimo/_lsp/
|
|
217
|
+
__marimo__/
|
|
218
|
+
|
|
219
|
+
# Streamlit
|
|
220
|
+
.streamlit/secrets.toml
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## [0.3.0] - 2026-05-13
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- Initial public release of **Tree Printer**
|
|
13
|
+
- Directory tree generation from the command line
|
|
14
|
+
- Optional file and directory icons (`--icons`)
|
|
15
|
+
- Sorting support (`--sort name | size | modified`)
|
|
16
|
+
- File metadata display (size and modified time)
|
|
17
|
+
- File and directory exclusion options
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
- Designed a modular architecture consisting of `printer`, `formatter`, `icons`, and `cli` modules
|
|
21
|
+
- Improved CLI help and overall user experience
|
|
22
|
+
- Created a clean and extensible formatter design
|
|
23
|
+
|
|
24
|
+
### Documentation
|
|
25
|
+
- Added a comprehensive README
|
|
26
|
+
- Added usage examples
|
|
27
|
+
- Added a complete CLI options reference
|
|
28
|
+
- Added preview output examples
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## [0.3.1] - 2026-05-14
|
|
33
|
+
|
|
34
|
+
### Added
|
|
35
|
+
- Added the `--version` (`-v`) command to display the current Tree Printer version
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
- Improved package metadata
|
|
39
|
+
- Improved installation behavior
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## [0.4.0] - 2026-07-03
|
|
44
|
+
|
|
45
|
+
### Added
|
|
46
|
+
- Comprehensive test suite using **pytest**
|
|
47
|
+
- Automated Continuous Integration (CI) using **GitHub Actions**
|
|
48
|
+
- Automated testing across supported Python versions
|
|
49
|
+
- Improved project metadata for PyPI
|
|
50
|
+
- Added project URLs, keywords, and classifiers to package metadata
|
|
51
|
+
|
|
52
|
+
### Changed
|
|
53
|
+
- Modernized packaging configuration
|
|
54
|
+
- Improved development workflow
|
|
55
|
+
- Enhanced project documentation
|
|
56
|
+
- Updated the project to follow modern Python packaging best practices
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Amirmasoud
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: directory-tree-printer
|
|
3
|
+
Version: 0.4.1
|
|
4
|
+
Summary: A Python CLI tool for generating clean directory tree structures.
|
|
5
|
+
Author: AmirmasoudCS
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/AmirmasoudCS/Tree-Printer
|
|
8
|
+
Project-URL: Repository, https://github.com/AmirmasoudCS/Tree-Printer
|
|
9
|
+
Project-URL: Issues, https://github.com/AmirmasoudCS/Tree-Printer/issues
|
|
10
|
+
Keywords: tree,cli,directory,filesystem,terminal
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Environment :: Console
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Requires-Python: >=3.10
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Requires-Dist: pathspec
|
|
21
|
+
Requires-Dist: rich
|
|
22
|
+
Provides-Extra: dev
|
|
23
|
+
Requires-Dist: build; extra == "dev"
|
|
24
|
+
Requires-Dist: pytest; extra == "dev"
|
|
25
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
|
26
|
+
Requires-Dist: twine; extra == "dev"
|
|
27
|
+
Requires-Dist: setuptools-scm[toml]>=8; extra == "dev"
|
|
28
|
+
Dynamic: license-file
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
# ๐ฒ Tree Printer
|
|
32
|
+
|
|
33
|
+
[](https://github.com/AmirmasoudCS/Tree-Printer/releases)
|
|
34
|
+
[](https://github.com/AmirmasoudCS/Tree-Printer/actions/workflows/tests.yml)
|
|
35
|
+
[](LICENSE)
|
|
36
|
+
[](https://www.python.org/)
|
|
37
|
+
|
|
38
|
+
A lightweight and customizable command-line utility for generating beautiful directory tree structures directly from your terminal.
|
|
39
|
+
|
|
40
|
+
Tree Printer makes it easy to visualize project layouts, document repositories, create examples for documentation, and inspect filesystem structures with optional icons, metadata, filtering, sorting, and color themes.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## โจ Features
|
|
45
|
+
|
|
46
|
+
- ๐ณ Generate recursive directory trees
|
|
47
|
+
- ๐ Display directories only
|
|
48
|
+
- ๐๏ธ Show or hide hidden files
|
|
49
|
+
- ๐ซ Exclude files, directories, or file extensions
|
|
50
|
+
- ๐ Limit recursion depth
|
|
51
|
+
- ๐ค Sort entries by:
|
|
52
|
+
- Name
|
|
53
|
+
- Size
|
|
54
|
+
- Last modified date
|
|
55
|
+
- ๐ Display file size
|
|
56
|
+
- ๐ Display modification timestamps
|
|
57
|
+
- ๐จ Multiple color themes
|
|
58
|
+
- ๐ผ๏ธ Optional file and folder icons
|
|
59
|
+
- ๐ Export output to text files
|
|
60
|
+
- ๐ซ Respect `.gitignore`
|
|
61
|
+
- โก Fast and lightweight
|
|
62
|
+
- ๐งช Fully tested with pytest
|
|
63
|
+
- ๐ Continuous Integration using GitHub Actions
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## ๐ฆ Installation
|
|
68
|
+
|
|
69
|
+
### From PyPI (Recommended)
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
pip install directory-tree-printer
|
|
73
|
+
````
|
|
74
|
+
|
|
75
|
+
### From source
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
git clone https://github.com/AmirmasoudCS/Tree-Printer.git
|
|
79
|
+
|
|
80
|
+
cd Tree-Printer
|
|
81
|
+
|
|
82
|
+
pip install .
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## ๐ Quick Start
|
|
88
|
+
|
|
89
|
+
Print the current directory
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
tp .
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Print another directory
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
tp path/to/project
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Print only directories
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
tp --dirs-only
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Show icons
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
tp --icons
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Show file sizes
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
tp --size
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Limit depth
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
tp --max-depth 2
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Save output
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
tp --output tree.txt
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## ๐ Examples
|
|
134
|
+
|
|
135
|
+
### Basic
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
tp .
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
```text
|
|
142
|
+
project
|
|
143
|
+
โโโ src
|
|
144
|
+
โ โโโ main.py
|
|
145
|
+
โ โโโ utils.py
|
|
146
|
+
โโโ README.md
|
|
147
|
+
โโโ pyproject.toml
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
### Icons
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
tp --icons
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
```text
|
|
159
|
+
๐ project
|
|
160
|
+
โโโ ๐ src
|
|
161
|
+
โ โโโ ๐ main.py
|
|
162
|
+
โ โโโ ๐ utils.py
|
|
163
|
+
โโโ ๐ README.md
|
|
164
|
+
โโโ โ๏ธ pyproject.toml
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
### File Sizes
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
tp --size
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
```text
|
|
176
|
+
README.md (5.8 KB)
|
|
177
|
+
main.py (4.2 KB)
|
|
178
|
+
config.py (831 B)
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
### Modified Dates
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
tp --modified
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
```text
|
|
190
|
+
README.md (2026-05-12 18:42)
|
|
191
|
+
main.py (2026-05-11 14:30)
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
### Themes
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
tp --theme sunset
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+

|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## โ๏ธ CLI Options
|
|
207
|
+
|
|
208
|
+
| Option | Alias | Description |
|
|
209
|
+
| -------------------- | ----- | ----------------------------------- |
|
|
210
|
+
| `--max-depth` | `-md` | Limit recursion depth |
|
|
211
|
+
| `--show-hidden` | `-sh` | Include hidden files |
|
|
212
|
+
| `--dirs-only` | `-do` | Show only directories |
|
|
213
|
+
| `--exclude-dirs` | `-ed` | Exclude directories |
|
|
214
|
+
| `--exclude-files` | `-ef` | Exclude files |
|
|
215
|
+
| `--exclude-suffixes` | `-es` | Exclude file extensions |
|
|
216
|
+
| `--sort` | `-st` | Sort by name, size or modified |
|
|
217
|
+
| `--size` | `-s` | Display file sizes |
|
|
218
|
+
| `--modified` | `-m` | Display modified dates |
|
|
219
|
+
| `--icons` | `-i` | Display icons |
|
|
220
|
+
| `--theme` | `-th` | Select a color theme |
|
|
221
|
+
| `--no-color` | `-nc` | Disable colored output |
|
|
222
|
+
| `--gitignore` | `-gi` | Ignore files listed in `.gitignore` |
|
|
223
|
+
| `--output` | `-o` | Write output to a file |
|
|
224
|
+
| `--version` | `-v` | Show installed version |
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## ๐งช Development
|
|
229
|
+
|
|
230
|
+
Clone the repository
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
git clone https://github.com/AmirmasoudCS/Tree-Printer.git
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
Install development dependencies
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
pip install -e ".[dev]"
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
Run the test suite
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
pytest
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Run tests with coverage
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
pytest --cov=tree_printer --cov-report=term-missing
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Build the package
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
python -m build
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Verify the package
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
python -m twine check dist/*
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## ๐ Project Structure
|
|
269
|
+
|
|
270
|
+
```text
|
|
271
|
+
|
|
272
|
+
โโโ ๐ images
|
|
273
|
+
โ โโโ ๐ผ๏ธ themeImage1.png
|
|
274
|
+
โโโ ๐ tests
|
|
275
|
+
โ โโโ ๐ __init__.py
|
|
276
|
+
โ โโโ ๐ test_cli.py
|
|
277
|
+
โ โโโ ๐ test_formatter.py
|
|
278
|
+
โ โโโ ๐ test_printer.py
|
|
279
|
+
โโโ ๐ tree_printer
|
|
280
|
+
โ โโโ ๐ __init__.py
|
|
281
|
+
โ โโโ ๐ cli.py
|
|
282
|
+
โ โโโ ๐ config.py
|
|
283
|
+
โ โโโ ๐ file_types.py
|
|
284
|
+
โ โโโ ๐ formatter.py
|
|
285
|
+
โ โโโ ๐ icons.py
|
|
286
|
+
โ โโโ ๐ models.py
|
|
287
|
+
โ โโโ ๐ printer.py
|
|
288
|
+
โ โโโ ๐ themes.py
|
|
289
|
+
โโโ ๐ CHANGELOG.md
|
|
290
|
+
โโโ โ๏ธ LICENSE
|
|
291
|
+
โโโ ๐ main.py
|
|
292
|
+
โโโ โ๏ธ pyproject.toml
|
|
293
|
+
โโโ ๐ README.md
|
|
294
|
+
โโโ ๐ requirements-dev.txt
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
## ๐ฃ๏ธ Roadmap
|
|
300
|
+
|
|
301
|
+
Future improvements include:
|
|
302
|
+
|
|
303
|
+
* Additional export formats
|
|
304
|
+
* Custom icon packs
|
|
305
|
+
* More color themes
|
|
306
|
+
* Configuration file support
|
|
307
|
+
* Improved Windows terminal support
|
|
308
|
+
* Performance improvements for very large directories
|
|
309
|
+
|
|
310
|
+
Suggestions and pull requests are always welcome.
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
## ๐ค Contributing
|
|
315
|
+
|
|
316
|
+
Contributions, feature requests, and bug reports are welcome.
|
|
317
|
+
|
|
318
|
+
If you'd like to contribute:
|
|
319
|
+
|
|
320
|
+
1. Fork the repository
|
|
321
|
+
2. Create a feature branch
|
|
322
|
+
3. Make your changes
|
|
323
|
+
4. Run the test suite
|
|
324
|
+
5. Submit a Pull Request
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
## ๐ Changelog
|
|
329
|
+
|
|
330
|
+
See [CHANGELOG.md](CHANGELOG.md) for release history.
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
## โ๏ธ License
|
|
335
|
+
|
|
336
|
+
This project is licensed under the MIT License.
|
|
337
|
+
|
|
338
|
+
See [LICENSE](LICENSE) for details.
|
|
339
|
+
|
|
340
|
+
---
|