rahulbordoloi / Directory-Tree

Python Utility Package that displays out the Tree Structure of a Particular Directory.
https://pypi.org/project/directory-tree/
GNU General Public License v3.0
32 stars 13 forks source link

Enh/main function #16

Closed timdiller closed 3 months ago

timdiller commented 1 year ago

Add a command line interface for directory_tree. The use case is installing something with the same utility as tree in an environment where pip install is available but not sudo apt install.

To make the packaging a little more Pythonic, I renamed src to directory_tree and added __init__.py and __main__.py with argparseing so that it can be invoked from the command line:

❯ python directory_tree -L 2 -I '__pycache__' 'directory_tree.egg-info'
/
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── directory_tree/
│   ├── __init__.py
│   ├── __main__.py
│   └── directory_tree.py
├── images/
│   ├── CWDwithHeader.png
│   ├── SampleDirectoryTree.png
│   ├── UserSpecifiedDirectoryMaxDep.png
│   └── UserSpecifiedDirectoryStrRepShowHidden.png
├── LICENSE
├── MANIFEST.in
├── README.md
├── setup.py
└── Test/
    ├── Main Directory/
    ├── v0_0_2_Test.py
    ├── v0_0_3_Test.py
    ├── v0_0_4_Test.py
    └── v0_0_5_Test.py
rahulbordoloi commented 3 months ago

Thanks @timdiller for making the changes. I'll do the necessary tests and modifications if any before publishing it.

rahulbordoloi commented 2 months ago

New Changes are Live in PyPi! (https://pypi.org/project/directory-tree/) @timdiller