Skip to content

Commit 7272810

Browse files
committed
allow setting PYTHONPATH
1 parent 98014e4 commit 7272810

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

robotframework_libtoc/libtoc.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
import sys
23
import shutil
34
import glob
45
import argparse
@@ -197,10 +198,14 @@ def main():
197198
parser.add_argument("--config_file", default=".libtoc", help="File in each folder with docs generation configs")
198199
parser.add_argument("--toc_file", default="keyword_docs.html", help="Name of the TOC file generated")
199200
parser.add_argument("--toc_template", default="", help = "Custom HTML template for the TOC file")
200-
parser.add_argument("--homepage_template", default="", help = "Custom HTML template for the homepage file")
201+
parser.add_argument("--homepage_template", default="", help = "Custom HTML template for the homepage file")
202+
parser.add_argument("-P", "--pythonpath", default="", help="Additional locations where to search for libraries and resources similarly as when running tests")
201203

202204
args = parser.parse_args()
203205

206+
if args.pythonpath:
207+
sys.path.insert(0, args.pythonpath)
208+
204209
print(f"Creating docs for: {os.path.abspath(args.resources_dir)}")
205210

206211
if os.path.isdir(args.output_dir):

0 commit comments

Comments
 (0)