diff --git a/src/AuDaGe/__main__.py b/src/AuDaGe/__main__.py index 5aabf4a..bfc11cb 100644 --- a/src/AuDaGe/__main__.py +++ b/src/AuDaGe/__main__.py @@ -119,30 +119,35 @@ def convert(args): def list_configs(): + excluded_files = ["schema.yaml"] + excluded_dirs = ["__pycache__"] cprint("Available import/export formats:", "cyan", attrs=["bold"]) printed_dirs = [] for folder in AuDaGe.folders: cprint(" Folder '" + folder.name + "':", "green", attrs=["bold"]) for dirpath, _, files in folder.walk(on_error=print): - dir_path = Path(dirpath) + dir_path = Path(dirpath).relative_to(folder) if ( - len(dir_path.parts) >= 2 - and dir_path.parts[1] not in printed_dirs + len(dir_path.parts) >= 1 + and dir_path.parts[0] not in excluded_dirs + printed_dirs ): - printed_dirs.append(dir_path.parts[1]) + printed_dirs.append(dir_path.parts[0]) cprint( - " " + dir_path.parts[1].replace("_", " ").title() + ":", + " " + dir_path.parts[0].replace("_", " ").title() + ":", attrs=["bold"], ) for file in files: file_path = Path(file) - if file_path.suffix == ".yaml": + if ( + file_path.suffix == ".yaml" + and file not in excluded_files + ): print( " " + str( - Path(*Path(dirpath).parts[1:]).joinpath( - file_path.stem - ) + Path( + *Path(dirpath).relative_to(folder).parts[1:] + ).joinpath(file_path.stem) ).replace("\\", ".") )