Added so much stuff I cant keep up. I think some sorting capability and a way to add metadata to each folder (WIP)
This commit is contained in:
@@ -50,7 +50,7 @@ def load_metadata_file(metadata_path: Path) -> Dict[str, Any]:
|
||||
|
||||
def load_folder_metadata(folder_path: Path) -> Dict[str, Any]:
|
||||
"""
|
||||
Load folder-level metadata from meta.yaml or meta.json.
|
||||
Load folder-level metadata from meta.yaml, meta.json, or metadata.json.
|
||||
|
||||
Args:
|
||||
folder_path: Path to the folder to check for metadata
|
||||
@@ -58,8 +58,8 @@ def load_folder_metadata(folder_path: Path) -> Dict[str, Any]:
|
||||
Returns:
|
||||
Dictionary containing the folder metadata
|
||||
"""
|
||||
# Try YAML first, then JSON
|
||||
for filename in ['meta.yaml', 'meta.yml', 'meta.json']:
|
||||
# Try YAML first, then JSON (including metadata.json for backwards compatibility)
|
||||
for filename in ['meta.yaml', 'meta.yml', 'meta.json', 'metadata.json']:
|
||||
metadata_path = folder_path / filename
|
||||
if metadata_path.exists():
|
||||
return load_metadata_file(metadata_path)
|
||||
|
||||
Reference in New Issue
Block a user