Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30be506 commit 693616cCopy full SHA for 693616c
rptree/__main__.py
@@ -0,0 +1,23 @@
1
+"""This module provides the RP Tree CLI."""
2
+
3
+import pathlib
4
+import sys
5
6
+from .cli import parse_cmd_line_arguments
7
+from .rptree import DirectoryTree
8
9
10
+def main():
11
+ args = parse_cmd_line_arguments()
12
+ root_dir = pathlib.Path(args.root_dir)
13
+ if not root_dir.is_dir():
14
+ print("The specified root directory doesn't exist")
15
+ sys.exit()
16
+ tree = DirectoryTree(
17
+ root_dir, dir_only=args.dir_only, output_file=args.output_file
18
+ )
19
+ tree.generate()
20
21
22
+if __name__ == "__main__":
23
+ main()
0 commit comments