2024-03-22 13:06:09 +01:00
|
|
|
#!/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)
|
2024-03-26 11:52:00 +01:00
|
|
|
# print(cmd_args.exclude)
|
2024-03-22 13:06:09 +01:00
|
|
|
path = cmd_args.path
|
|
|
|
list_dir_first = cmd_args.list_directories_first
|
2024-03-28 16:11:35 +01:00
|
|
|
colorize = cmd_args.colorize
|
2024-03-22 13:06:09 +01:00
|
|
|
|
|
|
|
# opts for generatign the tree
|
|
|
|
opts = {
|
|
|
|
'items_to_exclude' : cmd_args.exclude or [],
|
2024-03-28 16:11:35 +01:00
|
|
|
'list_dir_first' : list_dir_first,
|
|
|
|
'colorize' : colorize,
|
2024-03-22 13:06:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
ntree = NerdTree(path, opts=opts)
|
|
|
|
ntree.print()
|