Coder Social home page Coder Social logo

rahulbordoloi / directory-tree Goto Github PK

View Code? Open in Web Editor NEW
26.0 26.0 11.0 1.32 MB

Python Utility Package that displays out the Tree Structure of a Particular Directory.

Home Page: https://pypi.org/project/directory-tree/

License: GNU General Public License v3.0

C++ 21.46% Python 78.54%
hacktoberfest pypi pypi-package python3

directory-tree's Introduction

Hola! ๐Ÿ‘‹

Ok

GitHub

About Me :

I'm a Vivid Pythonista ๐Ÿ, but C++ by โค๏ธ. Linux Fanboy ๐Ÿง.
Passionate about Converting Problem Statements into Efficient and Automated Solutions. Currently working as a Senior Software Engineer at FinanceOps, Texas (Remote). Much Passionate about Contributing to the Open Source Community :octocat:.

my github statsย languages

[Note : Jupter Notebook Contributions are excluded from here]


To know more About Me, visit my Portfolio.

rahulbordoloi dev.to linkedin twitter reddit github telegram

directory-tree's People

Contributors

imgbotapp avatar jeyenkc avatar pat-laub avatar rahulbordoloi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

directory-tree's Issues

Define tree depth

Hi, this library is really nice. I'm impressed by how fast I get the folder structure!

If I may, would be possible to define the depth of my search?

Best,
Gustavo

function display tree

the display tree() is sweet, but i would need only the string output -without the print to the std_out-, because I must redirect it in a GUI log.

Smthg like
(display_tree_as_str()) -> the string repr of the tree.
I can easily code it myself, but It would be nicer to add this simple feature to the API surface of your pckg

Best regards

'os.stat_result' object has no attribute 'st_file_attributes'

hello, its me again.

Since ver. 0.0.3 , I get everywhere the same Exception:
'os.stat_result' object has no attribute 'st_file_attributes'

My tests were with python 3.7 to 3.9.14 at least.

Il will stick to 0.0.2 in the meantime.

Thank you a lot!

AbstractTree

Hi,

I wanted to let you know that I recently created a package AbstractTree.
It can be used to make somewhat similar output as Directory-Tree, but it can also print other kinds of trees.

When used like this:

from pathlib import Path

from abstracttree import print_tree

# The lambda will hide hidden files
print_tree(Path('.'), keep=lambda n, it: not str(n).startswith("."))

This will print:

โ”œโ”€ CHANGELOG.md
โ”œโ”€ CODE_OF_CONDUCT.md
โ”œโ”€ images
โ”‚  โ”œโ”€ images\CWDwithHeader.png
โ”‚  โ”œโ”€ images\SampleDirectoryTree.png
โ”‚  โ”œโ”€ images\UserSpecifiedDirectoryMaxDep.png
โ”‚  โ””โ”€ images\UserSpecifiedDirectoryStrRepShowHidden.png
โ”œโ”€ LICENSE
โ”œโ”€ MANIFEST.in
โ”œโ”€ README.md
โ”œโ”€ setup.py
โ”œโ”€ src
โ”‚  โ””โ”€ src\directory_tree.py
โ””โ”€ Test
...

which looks similar to what Directory-Tree prints.

If you have any ideas or suggestions, let me know.
Or feel free to close this issue for being off topic.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.