Displays a given list of paths and displays them as a tree.
This application does not interact with the filesystem in any way.
It's simply a string/text processor.
Paths can be read from both command-line arguments as well as from standard input.
TODO
$ path_tree_viewer hello/world foo/bar/baz
/
hello
world
foo
bar
baz
$ path_tree_viewer --help
Usage: path_tree_viewer [OPTIONS] PATHS...
Displays a given list of paths and displays them as a tree.
This application does not interact with the filesystem in any way.
It's simply a string/text processor.
ARGUMENTS
PATHS Paths to display as a tree
Paths can also be read from STDIN
OPTIONS
-h, --help Show help
-v, --version Show version
-d, --delimiter VALUE Path delimiter (default: '/')
-I, --indent-char VALUE Character to use for indentation (default: ' ')
-i, --indent-size VALUE Size for each indentation level (default: '2')
View all directories within a path recursively, in a sorted manner:
find /srv/share -type d | sort | path_tree_viewer
View the contents of a (compressed) archive:
tar -tf archive.tar.gz | path_tree_viewer
View the contents of a JAR:
jar tf archive.jar | path_tree_viewer
Why not use tree
?
This application is designed to manipulate text strings, as opposed to tree
which will read the
filesystem. This allows users to view the result of many operations concatenated into a single file
or pipe directly from other commands, such as find
, which can be quite complex (using
functionality tree
does not have.)
Definite:
- Parse & print paths as a tree from arguments & STDIN
-
--format
option with support for both YAML and JSON -
tree
-like output with UTF-8 box drawing characters - Gem package
Possible:
- Graphviz
dot
format output (and if so, allow to generate image) - Gource-like image output
- Pacman package
- Fork it (https://github.com/RyanScottLewis/path_tree_viewer/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
This program is available as open source under the terms of the MIT License http://opensource.org/licenses/MIT.