Renamer discovers _Sero Batch roots under Property Folders 🟩

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Daniel Roth 2026-07-03 11:13:39 +00:00
parent dcd2a7442f
commit a442dcfbaa

View file

@ -67,7 +67,14 @@ class SharepointRenamerOrchestrator:
self._dry_run = dry_run
def _discover_roots(self) -> list[str]:
raise NotImplementedError
contents = self._sp_client.get_folders_in_path(BASE_PATH)
batch_roots = sorted(
f"{BASE_PATH}/{item['name']}"
for item in contents.get("value", [])
if "folder" in item
and item["name"].lower().startswith(BATCH_FOLDER_PREFIX.lower())
)
return [BASE_PATH, *batch_roots]
def run(self) -> None:
with open(self._csv_path, newline="", encoding="utf-8-sig") as f: