Skip to content

A simple commandline tool that displays a directory structure as a pretty tree.

License

Notifications You must be signed in to change notification settings

andy-byers/treeview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

treeview

A simple commandline tool that displays a directory structure as a pretty tree.

Example

This example displays the SQLite3 source tree. cd into the directory containing sqlite and run

python3 treeview.py -n 10 ./sqlite

We see as our output: treeview_n_10

As shown above, the number of entries printed in each directory has been limited to 10 using the -n option.

Similarly, we can specify the number of levels to show using the -L option. We write:

python3 treeview.py -n 10 -L 2 ./sqlite

This causes the first two levels to be printed: treeview_n_10_L_2

Tests

To run the tests, cd into test and run

bash test.sh

The script will create an example directory tree and run treeview on it with different arguments, diffing the results with hand-typed trees from test/answers. If a test fails, its name and the location of its diff output will be reported.

Contributing

There are a lot of cool features that could be added. Feel free to create a pull request if you'd like to contribute.

About

A simple commandline tool that displays a directory structure as a pretty tree.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published