No description
Find a file
2026-04-18 13:42:26 -04:00
folder-linker-v1.0.py add: simplified AMPP Script Task — looks up folder from Dragon-Wind, links asset (replaces folder-organizer) 2026-04-18 13:42:26 -04:00
folder-organizer-v3.3.py Add folder organizer v3.3 - fix special char URL encoding 2026-04-03 10:26:47 -04:00
folder-organizer-v3.4.py v3.4.1: Fix logger.log() call — drop logger, use raise to surface lookup errors instead 2026-04-10 13:30:48 -04:00
folder-organizer-v3.5.py Add folder-organizer-v3.5: full match depth check, type guards, specific exception handling 2026-04-12 14:04:26 -04:00
README.md Add README 2026-04-03 10:26:46 -04:00

AMPP Folder Organizer

IronPython 3.4 script for Grass Valley AMPP Framelight X Script Task brick. Automatically organizes ingested assets into nested virtual folders based on filename prefixes, using -- as the path delimiter.

Overview

This script runs as part of the FramelightX asset ingestion pipeline. It parses filenames with the format:

FolderName--SubFolder--Filename.ext

and creates the folder structure FolderName/SubFolder/ in AMPP, linking the asset to the deepest folder.

Example

Filename Result
BMG--Videos--Clip1.mp4 Creates BMG/Videos/, links asset there
NEWS--PKG--Story.mxf Creates NEWS/PKG/, links asset there
IMG--4709.jpg Creates IMG/, links asset there
NoPrefix.mp4 Skipped (no -- found)

History

  • v3.2 → v3.3: Fixed special character handling in folder names (apostrophes, ampersands, etc.) by properly URL-encoding the hierarchy lookup path.

Environment

  • Runtime: IronPython 3.4 on .NET 8
  • Available Objects: httpClient (ScriptHttpClient), job (ScsJob), asset (ScriptAsset), logger (ScriptLogger)
  • HTTP Endpoint: Relative paths to AMPP API (e.g., api/v1/store/folder/folders)

API Calls

Get or check folder existence

GET api/v1/store/folder/folders/hierarchy?path={encoded_path}

Create folder

POST api/v1/store/folder/folders
Body: {"name:text": "FolderName", "parentFolders:tags": ["parentFolderId"]}
POST api/v1/store/folder/references
Body: {"folder:id": "folderId", "asset:id": "assetId"}

Deployment

Copy the script content into a FramelightX Script Task brick. Place it before the Proxy Generator in the ingest workflow.

Notes

  • The script is idempotent: running it multiple times on the same asset is safe.
  • Special characters (apostrophes, ampersands, parentheses) are preserved in folder names.
  • The -- delimiter is URL-safe and does not conflict with filesystem conventions.