Skip to content

Commit f965fd9

Browse files
Add libraries list option to split.py
Overrides the default list of libraries to split.
1 parent 947e740 commit f965fd9

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

split.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,19 @@ def main():
9595
args_parser.add_argument(
9696
"-o", "--out", help="where to write the files (default: out)", default="out"
9797
)
98+
args_parser.add_argument(
99+
"-l",
100+
"--library",
101+
action="append",
102+
dest="libraries",
103+
help="the libraries to split (default: [httplib])",
104+
)
98105
args = args_parser.parse_args()
99106

107+
default_libraries = ["httplib"]
100108
search_dirs = ["example"]
101-
lib_names = ["httplib"]
102109

103-
for lib_name in lib_names:
110+
for lib_name in args.libraries or default_libraries:
104111
split(lib_name, search_dirs, args.extension, args.out)
105112

106113

0 commit comments

Comments
 (0)