dl6nm / path-tree-generator Goto Github PK
View Code? Open in Web Editor NEWGenerate tree-like directory listings for humans and output them as str, list[str], dict or json.
License: MIT License
Generate tree-like directory listings for humans and output them as str, list[str], dict or json.
License: MIT License
Take care of the newest features available in 3.10 not working earlier versions like Python 3.6.
Gather informations for developers and write them down in the README.md for potential collaborators.
Add the ability for the user of this package to change the characters for the human readable output string.
The constants are defined as follows:
HR_DIR_PREFIX = "["
HR_DIR_SUFFIX = "]"
HR_PIPE = "│"
HR_ELBOW = "└──"
HR_TEE = "├──"
HR_PIPE_PREFIX = "│ "
HR_SPACE_PREFIX = " "
As a user I would like to have additional optional fields, regarding a directory or file for getting more information out of a PathTree
instance.
Implement a parser for reading or importing json
and dict
representations of a PathTree.
As a user I want to create the same directory structure in a different location as it was read and created with PathTree
.
Optional it would be nice to create dummy files.
I'll suggest to use a pathlib.Path
type only instead of also allowing a str
to set in ListEntry
model. This would be more straight forward for returning only one type, instead of guessing the right one.
In case of getting relative_paths
out of the model, we can then use one of the following implementations in _PathTreeGenerator
:
p.relative_to(self._root_dir)
, if relative_paths=True
p.relative_to('.')
, if relative_paths=False
This can makt it easier to determine the absolute or relative path
of a ListEntry
in PathTree(...).tree()
.
To keep it short and simple, change the naming of all "get_" methods to be clear in all circumstances when using this package.
This change is inspired by...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.