Generate human-readable directory listings in a tree-like format as `list[str]`, `dict` or `json`
Project description
path-tree-generator
Generate human-readable directory listings in a tree-like format as list[str]
, dict
or json
from path_tree_generator import PathTree
pt = PathTree('/my/path/to/generate')
print(
pt.human_readable()
)
ATTENTION: NOT FULLY IMPLEMENTED YET :construction:
:warning: CURRENTLY THIS PACKAGE IS UNDER HEAVY DEVELOPMENT AND NOT FULLY IMPLEMENTED YET! :warning:
The fist working (early) version is released as path-tree-generator v0.0.1 and contains the most base implementations.
More to come for path-tree-generator v0.1.0:
- Adding a "better" getter methods naming
- Extend tests to check all possible parameters of a method or class
- ...
But keep in mind that classes, methods and their signatures might change anytime during development till the first official release 1.0.0.
Table of Contents
Requirements
path-tree-generator
depends on the following packages:
- Pydantic for data models and validation
Usage
Installation
pip install path-tree-generator
Example
from path_tree_generator import PathTree
pt = PathTree('/my/path/to/generate')
print(
pt.human_readable()
)
The code above outputs a tree-like formatted recursive directory listing. Directories are wrapped in square brackets, files aren't.
[data]
├── data.json
├── data.tree
├── [myDirectory-1]
│ ├── myFile.txt
│ └── [subdirectory]
│ └── green.gif
└── [myDirectory-2]
├── [subdirectory1]
│ └── green.gif
└── [subdirectory2]
├── myFile.txt
└── myFile2.txt
Support
If you're opening issues, please mention the version that the issue relates to.
Contributing
To contribute to this project, fork the repository, make your changes and create a pull request.
License
This project is licensed under the terms of the MIT license.
Known Issues
- Python version compatibility < v3.10 is not tested yet
- Getter methods aren't named perfectly, this will be solved in a future version
- Not all tests are fully implemented yet
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for path-tree-generator-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44321e161308d32667c92dea577ee101ee517082f62fde287f30d04469eaa6a9 |
|
MD5 | 70d7abd22d0e002ebfcb1b9040ffc767 |
|
BLAKE2b-256 | 17c6b800ea02946107774b59bc978a433e0b2a94dc4632a62ce83b3bdccb9466 |
Hashes for path_tree_generator-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 849a21f660051ee15eb47a002c721ba833f4943e3675eeb87e694f5130d7ca13 |
|
MD5 | d42bf5e884461d0d082277f5cdca086f |
|
BLAKE2b-256 | 405e8af295665329e96449049ee47a372232a038f0e4d89228991550c2ebb21e |