23 lines
552 B
Python
Executable File
23 lines
552 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
from src.ntree_cmdline_parser import cmd_args
|
|
from src.tree import NerdTree
|
|
|
|
if __name__ == '__main__':
|
|
# print(cmd_args.path)
|
|
# print(cmd_args.show_children_nodes)
|
|
# print(cmd_args.exclude)
|
|
path = cmd_args.path
|
|
list_dir_first = cmd_args.list_directories_first
|
|
colorize = cmd_args.colorize
|
|
|
|
# opts for generatign the tree
|
|
opts = {
|
|
'items_to_exclude' : cmd_args.exclude or [],
|
|
'list_dir_first' : list_dir_first,
|
|
'colorize' : colorize,
|
|
}
|
|
|
|
ntree = NerdTree(path, opts=opts)
|
|
ntree.print()
|