diff options
Diffstat (limited to '__main__.py')
-rw-r--r-- | __main__.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/__main__.py b/__main__.py index 79d6a23..bae42ce 100644 --- a/__main__.py +++ b/__main__.py @@ -1,3 +1,4 @@ +import os import sys import yaml @@ -15,7 +16,19 @@ def main(): yaml_path = Path(sys.argv[1]) yaml_file_paths = yaml_path.glob("*.yaml") - slot_lists = {} + processes = [] + bin_dir = "/usr/bin" + for file in os.listdir(bin_dir): + if file == "[": + continue + + full_path = os.path.join(bin_dir, file) + if os.path.isfile(full_path) or os.path.islink(full_path): + processes.append(file) + + slot_lists = { + "process": TextSlotList.from_strings(processes) + } for yaml_file_path in yaml_file_paths: with open(yaml_file_path, "r", encoding="utf-8") as yaml_file: |