File tree Expand file tree Collapse file tree 6 files changed +63
-23
lines changed Expand file tree Collapse file tree 6 files changed +63
-23
lines changed Original file line number Diff line number Diff line change 1
1
MIT License
2
2
3
- Copyright (c) 2020 Real Python
3
+ Copyright (c) 2021 Real Python
4
4
5
5
Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
of this software and associated documentation files (the "Software"), to deal
Original file line number Diff line number Diff line change
1
+ include LICENSE
Original file line number Diff line number Diff line change
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 ()
Original file line number Diff line number Diff line change 1
1
"""This module provides the RP Tree CLI."""
2
2
3
3
import argparse
4
- import pathlib
5
4
import sys
6
5
7
6
from . import __version__
8
- from .rptree import DirectoryTree
9
-
10
-
11
- def main ():
12
- args = parse_cmd_line_arguments ()
13
- root_dir = pathlib .Path (args .root_dir )
14
- if not root_dir .is_dir ():
15
- print ("The specified root directory doesn't exist" )
16
- sys .exit ()
17
- tree = DirectoryTree (
18
- root_dir , dir_only = args .dir_only , output_file = args .output_file
19
- )
20
- tree .generate ()
21
7
22
8
23
9
def parse_cmd_line_arguments ():
Original file line number Diff line number Diff line change
1
+ import pathlib
2
+ from setuptools import setup
3
+
4
+ from rptree import __version__
5
+
6
+ HERE = pathlib .Path ().cwd ()
7
+ DESCRIPTION = HERE .joinpath ("README.md" ).read_text ()
8
+ VERSION = __version__
9
+
10
+
11
+ setup (
12
+ name = "rptree" ,
13
+ version = VERSION ,
14
+ description = "Generate directory tree diagrams for Real Python articles" ,
15
+ long_description = DESCRIPTION ,
16
+ long_description_content_type = "text/markdown" ,
17
+ url = "https://github.com/realpython/rptree" ,
18
+ author = "Real Python" ,
19
+ author_email = "info@realpython.com" ,
20
+ maintainer = "Leodanis Pozo Ramos" ,
21
+ maintainer_email = "leodanis@realpython.com" ,
22
+ license = "MIT" ,
23
+ classifiers = [
24
+ "License :: OSI Approved :: MIT License" ,
25
+ "Programming Language :: Python :: 3" ,
26
+ "Programming Language :: Python :: 3.7" ,
27
+ "Programming Language :: Python :: 3.8" ,
28
+ "Programming Language :: Python :: 3.9" ,
29
+ "Programming Language :: Python :: Implementation :: CPython" ,
30
+ ],
31
+ packages = ["rptree" ],
32
+ include_package_data = True ,
33
+ entry_points = {
34
+ "console_scripts" : [
35
+ "rptree=rptree.__main__:main" ,
36
+ ]
37
+ },
38
+ )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments