in shelldocs/src/main/python/shelldocs.py [0:0]
def process_input(inputlist, skipprnorep):
""" take the input and loop around it """
def call_process_file(filename, skipsuperprivate):
''' handle building a ProcessFile '''
fileprocessor = ProcessFile(filename=filename,
skipsuperprivate=skipsuperprivate)
fileprocessor.process_file()
return fileprocessor.functions
allfuncs = []
for inputname in inputlist:
if pathlib.Path(inputname).is_dir():
for dirpath, dirnames, filenames in os.walk(inputname): #pylint: disable=unused-variable
for fname in filenames:
if fname.endswith('sh'):
allfuncs = allfuncs + call_process_file(
filename=pathlib.Path(dirpath).joinpath(fname),
skipsuperprivate=skipprnorep)
else:
allfuncs = allfuncs + call_process_file(
filename=inputname, skipsuperprivate=skipprnorep)
if allfuncs is None:
logging.error("ERROR: no functions found.")
sys.exit(1)
allfuncs = sorted(allfuncs)
return allfuncs