diff --git a/wobbl_tools/text/tree_view.py b/wobbl_tools/text/tree_view.py index 7b5fdcd..b46aa1d 100644 --- a/wobbl_tools/text/tree_view.py +++ b/wobbl_tools/text/tree_view.py @@ -1,5 +1,6 @@ #!/usr/bin/python3 import os +import sys from ..utils import module_path from .format import format_string @@ -65,4 +66,10 @@ def tree_view( if __name__ == "__main__": - print(tree_view(module_path, exclude_names=["__pycache__"])) + if len(sys.argv) == 1: # use first command line argument when set, else use the module path + path = module_path + + else: + path = sys.argv[1] + + print(tree_view(path, exclude_names=["__pycache__"]))