Download scripts/generate_tier2_batch03.py from ymyy307/long-div: direct link, hf CLI and curl.
- Browser
- Download file 20.5 kB
-
https://huggingface.co/ymyy307/long-div/resolve/main/scripts/generate_tier2_batch03.py
- Command line
-
hf download hf://ymyy307/long-div/scripts/generate_tier2_batch03.py
-
curl -L -o generate_tier2_batch03.py https://huggingface.co/ymyy307/long-div/resolve/main/scripts/generate_tier2_batch03.py
20.5 kB
| #!/usr/bin/env python3 | |
| import json | |
| from pathlib import Path | |
| from generate_tier2_batch02 import shot, line, compile_case | |
| ROOT = Path(__file__).resolve().parents[1] | |
| OUT = ROOT / "generated" / "tier2_batch03.json" | |
| CASES = [ | |
| { | |
| "case_id":"worker_11_tier2","tier":2,"target_identity":"<char3>", | |
| "first_appearance_shot":6,"reappearance_shot":13,"absence_gap":6, | |
| "characters":{ | |
| "<char1>":"a young white woman with a dark blond braid, a sea-green windbreaker, black trousers, and a compact camera across her chest", | |
| "<char2>":"a young Black man with short curls, a charcoal rain shell, tan trousers, and a navy knit cap", | |
| "<char3>":"an elderly South Asian man with a white beard, a rust wool cap, a navy pea coat, and a brass lighthouse badge" | |
| }, | |
| "shot_specs":[ | |
| shot(1,["<char1>"],"A wide establishing shot shows <Subject 1> entering the lighthouse path beside a low stone wall as sea fog moves across the headland.","Wind, distant surf, and one visitor speaks.",[line("<char1>","The fog is moving quickly, but the wall gives us a clear edge to follow.")]), | |
| shot(2,["<char2>"],"A medium shot follows <Subject 1> from the parking gate to the first bend, where he slows and looks toward the faint lighthouse outline.","Gravel footsteps, wind, and one reply.",[line("<char2>","I can see the lower tower now. I will stay on the inside of the path.")]), | |
| shot(3,["<char1>","<char2>"],"A lateral follow shot tracks both visitors along the wall while their jackets move lightly and the tower appears, disappears, then returns through fog.","Wind across stone and measured footsteps."), | |
| shot(4,["<char2>","<char1>"],"At a sheltered recess, <Subject 1> stops beside the wall and <Subject 2> joins him as a pale patch of sunlight reaches the path.","Surf, softer wind, and no speech."), | |
| shot(5,["<char1>","<char2>"],"A long shot frames both visitors approaching the lighthouse base while the entrance stair remains dim behind the curved wall.","Loose gravel and a distant buoy bell."), | |
| shot(6,["<char3>","<char1>","<char2>"],"<Subject 1> steps from the entrance recess, greets <Subject 2> and <Subject 3>, then enters the spiral stair doorway to check the upper closure.","A heavy door opens and one elderly voice.",[line("<char3>","I will confirm the upper stair is closed, then meet you on the sheltered side of the tower.")]), | |
| shot(7,["<char1>","<char2>"],"The visitors continue around the exterior wall, keeping close to the broad dry paving as fog crosses behind them.","Wind, surf, and footsteps."), | |
| shot(8,["<char1>"],"A close shot catches droplets on <Subject 1>'s camera strap before she lowers the camera and watches the fog reveal the wave line.","Strap movement and distant breaking water."), | |
| shot(9,["<char2>"],"<Subject 1> walks into the lee of the tower and removes his knit cap for a moment as the wind drops sharply.","Wind softens against thick stone."), | |
| shot(10,["<char1>","<char2>"],"A wide coastal view holds both visitors at the inner wall while the fog lifts enough to show the dark rocks below.","Surf grows clearer; no dialogue."), | |
| shot(11,["<char2>","<char1>"],"<Subject 1> turns toward the back curve and <Subject 2> follows, their route now fully visible between tower and wall.","Two sets of footsteps and a buoy bell."), | |
| shot(12,["<char1>"],"An over-the-shoulder view from behind <Subject 1> looks toward the last bend, where a human outline begins to form in the thinning fog.","Wind shifts and gulls call."), | |
| shot(13,["<char3>"],"A medium shot reveals <Subject 1> rounding the tower base from the sheltered side, with the same white beard, rust cap, navy coat, and brass badge.","Footsteps on stone and the same elderly voice.",[line("<char3>","The upper stair is closed, and this side remains clear all the way back to the gate.")]), | |
| shot(14,["<char1>","<char2>","<char3>"],"A wide final shot follows all three away from the tower along the inner wall as sunlight reaches the headland behind them.","Three walking rhythms, surf, and no speech.") | |
| ] | |
| }, | |
| { | |
| "case_id":"worker_12_tier2","tier":2,"target_identity":"<char3>", | |
| "first_appearance_shot":7,"reappearance_shot":15,"absence_gap":7, | |
| "characters":{ | |
| "<char1>":"a middle-aged Black woman with a shaved head, a saffron blouse, charcoal trousers, and a lightweight manual wheelchair", | |
| "<char2>":"an elderly white man with wavy silver hair, a forest-green jacket, and a cherrywood walking cane", | |
| "<char3>":"a young Latino man with short dark curls, a cobalt museum jacket, black trousers, and a rectangular silver name pin" | |
| }, | |
| "shot_specs":[ | |
| shot(1,["<char1>"],"A wide establishing shot places <Subject 1> beneath a suspended metal sculpture in a high contemporary gallery as she rolls toward the first gentle ramp.","Wheel movement, airy room tone, and one voice.",[line("<char1>","The sculpture changes shape from this height. I want to try the upper curve as well.")]), | |
| shot(2,["<char2>"],"A medium shot shows <Subject 1> enter from the opposite arch and look upward while keeping his cane close beside him.","Cane tip, soft gallery echo, and one reply.",[line("<char2>","I will take the inside rail and meet you where the ramp widens.")]), | |
| shot(3,["<char1>","<char2>"],"A lateral tracking shot follows both visitors along the lower arc, with the hanging sculpture rotating slightly above them in conditioned air.","Wheels, footsteps, and a faint metallic creak."), | |
| shot(4,["<char1>"],"A close shot catches shifting reflected light across <Subject 1>'s face as she pauses beneath the sculpture's open center.","Quiet ventilation and wheel brakes."), | |
| shot(5,["<char2>","<char1>"],"<Subject 1> reaches the inner rail while <Subject 2> starts up the broad ramp, both visible in a long diagonal composition.","Cane, wheels, and high gallery ambience."), | |
| shot(6,["<char1>","<char2>"],"An over-the-shoulder view behind <Subject 1> looks toward the upper window platform where sunlight spreads across the floor.","Subdued footsteps from another gallery."), | |
| shot(7,["<char3>","<char1>","<char2>"],"<Subject 1> approaches from the high-window platform, speaks to both visitors, then accompanies <Subject 2> into a side corridor with a gentler turn.","Soft shoes and one clear coordinator voice.",[line("<char3>","The side corridor has the wider turn. I will travel it with you before you continue downhill.")]), | |
| shot(8,["<char2>"],"A wide shot shows <Subject 1> continue alone along the main ramp while the sculpture's lower elements align above his path.","Cane rhythm and ventilation."), | |
| shot(9,["<char2>"],"<Subject 1> pauses at the high-window rail and turns from the city view back toward the suspended form.","Distant street tone through glass."), | |
| shot(10,["<char2>"],"A close shot isolates the sculpture reflected in <Subject 1>'s glasses before he resumes the gradual curve.","A quiet cane touch and room echo."), | |
| shot(11,["<char2>"],"A fixed wide view shows <Subject 1> descend the far side, now seeing the sculpture against the bright window rather than the dark wall.","Measured steps and soft mechanical hum."), | |
| shot(12,["<char2>"],"<Subject 1> reaches a resting bay, sits briefly, then rises as a cloud moves and the reflected light cools.","Bench fabric and changing room tone."), | |
| shot(13,["<char2>"],"A medium follow shot keeps <Subject 1> centered as he walks behind the sculpture toward the final lower curve.","Cane and distant wheels outside the frame."), | |
| shot(14,["<char2>"],"From over his shoulder, the far ramp comes into view with two approaching figures partly hidden by the sculpture.","Gallery echo and soft wheel movement."), | |
| shot(15,["<char3>","<char1>","<char2>"],"A wide reappearance shot shows <Subject 1> descend beside <Subject 2> from the sculpture's opposite side toward <Subject 3>, clearly matching the cobalt jacket and silver pin seen earlier.","Wheels, footsteps, and the same coordinator voice.",[line("<char3>","The side turn was comfortable, and this descent brings us back beneath the sculpture together.")]) | |
| ] | |
| }, | |
| { | |
| "case_id":"worker_13_tier2","tier":2,"target_identity":"<char3>", | |
| "first_appearance_shot":5,"reappearance_shot":12,"absence_gap":6, | |
| "characters":{ | |
| "<char1>":"a young Black father with a close-cropped beard, a navy field coat, dark jeans, and a canvas shoulder bag", | |
| "<char2>":"a teenage Black girl with long box braids, a mustard rain jacket, burgundy trousers, and green rubber boots", | |
| "<char3>":"a middle-aged white woman with curly auburn hair, a dark green orchard vest, a cream shirt, and brown walking boots" | |
| }, | |
| "shot_specs":[ | |
| shot(1,["<char1>"],"A wide establishing shot follows <Subject 1> through the orchard gate and onto a leaf-strewn path between sloping rows.","Leaves, light wind, and one voice.",[line("<char1>","The path is firmer along the upper row. We can start there and move downhill slowly.")]), | |
| shot(2,["<char2>"],"A medium shot shows <Subject 1> close the gate and look up through moving branches toward brighter fruit on the slope.","Gate wood, leaves, and one reply.",[line("<char2>","I can see the red fruit near the windbreak. I will stay on the marked path.")]), | |
| shot(3,["<char1>","<char2>"],"A lateral follow tracks both visitors uphill, passing alternating bands of sun and tree shadow.","Boots on damp earth and leaf movement."), | |
| shot(4,["<char2>","<char1>"],"A close shot catches <Subject 1> smelling one fallen leaf while <Subject 2> waits beside the next row opening.","Leaves brushing coats; no speech."), | |
| shot(5,["<char3>","<char1>","<char2>"],"<Subject 1> rounds the first tree row, greets both visitors, then walks through the windbreak opening toward the far route.","Wind rises and one orchard owner speaks.",[line("<char3>","I will check the sheltered path beyond the windbreak and meet you higher on the slope.")]), | |
| shot(6,["<char1>","<char2>"],"The visitors continue uphill as <Subject 2> lightly steadies a low branch for <Subject 1> to pass without leaving the path.","Branch movement and measured steps."), | |
| shot(7,["<char2>"],"A medium shot follows <Subject 1> around a muddy patch and toward a single ripe apple hanging beside the route.","Wind in leaves and boots on soil."), | |
| shot(8,["<char1>","<char2>"],"<Subject 1> picks one permitted apple and breaks it by hand to share while <Subject 2> stands beside him under the canopy.","A crisp fruit break and quiet wind."), | |
| shot(9,["<char1>"],"A close shot shows <Subject 1> taste one slice and look toward the moving treetops rather than gathering more fruit.","Leaves and a distant crow."), | |
| shot(10,["<char2>","<char1>"],"The pair turn onto the upper cross-path, where the wind drops and the slope opens toward the orchard's far side.","Footsteps and softer leaf movement."), | |
| shot(11,["<char1>","<char2>"],"An over-the-shoulder view from behind both visitors reveals a figure beginning to descend between the high rows.","A wooden gate taps far away."), | |
| shot(12,["<char3>"],"A medium shot reveals <Subject 1> walking downhill with one ripe apple, clearly matching her auburn curls, green vest, cream shirt, and brown boots.","Leaves, steps, and the same woman speaks.",[line("<char3>","The sheltered path is dry, and this apple is ready to taste from the upper row.")]), | |
| shot(13,["<char1>","<char2>","<char3>"],"A wide final shot shows the three turn together into the sheltered row as the wind continues in the exposed trees behind them.","Three walking rhythms and orchard wind; no dialogue.") | |
| ] | |
| }, | |
| { | |
| "case_id":"worker_14_tier2","tier":2,"target_identity":"<char3>", | |
| "first_appearance_shot":6,"reappearance_shot":15,"absence_gap":8, | |
| "characters":{ | |
| "<char1>":"an elderly Latina woman with a silver braid, a lavender dance top, black practice trousers, and soft gray shoes", | |
| "<char2>":"a young East Asian man with wavy black hair, a rust T-shirt, navy practice trousers, and white dance shoes", | |
| "<char3>":"a middle-aged Black nonbinary dance teacher with a shaved head, a teal wrap jacket, charcoal trousers, and a thin silver bracelet" | |
| }, | |
| "shot_specs":[ | |
| shot(1,["<char1>"],"A wide establishing shot shows <Subject 1> crossing the empty dance floor and stopping at a comfortable distance from the mirror.","Soft shoe contact and one voice.",[line("<char1>","I want to practice the turn slowly enough to keep my balance through the pause.")]), | |
| shot(2,["<char2>"],"A medium shot follows <Subject 1> from the open corridor into the studio, where he tests two quiet side steps.","Footsteps and one reply.",[line("<char2>","I will leave more space between us and match the slower count.")]), | |
| shot(3,["<char1>","<char2>"],"A lateral tracking shot holds both dancers full-length as they shift weight left, pause, and return without touching.","Shoes on sprung floor and room tone."), | |
| shot(4,["<char2>","<char1>"],"A close shot catches their feet stop on the same count, followed by a wide mirror view as they reset apart.","Two soft stops and quiet breathing."), | |
| shot(5,["<char1>","<char2>"],"An over-the-shoulder angle behind <Subject 1> shows <Subject 2> complete a restrained half-turn and settle facing the corridor.","Fabric and a distant hallway door."), | |
| shot(6,["<char3>","<char1>","<char2>"],"<Subject 1> enters from the rear studio door, demonstrates one slow weight transfer, then accompanies <Subject 2> into the corridor for a brief rest.","Measured foot taps and one teacher voice.",[line("<char3>","Keep the pause in the middle. I will walk with you to the corridor, and we will return when your breathing settles.")]), | |
| shot(7,["<char2>"],"<Subject 1> continues alone with a small side step and stops before the mirror, leaving the rest of the studio open.","One set of steps and ventilation."), | |
| shot(8,["<char2>"],"A fixed wide shot shows <Subject 1> cross diagonally, turn only halfway, and return to his starting point.","Quiet footfalls and no speech."), | |
| shot(9,["<char2>"],"A close shot follows <Subject 1>'s shoulders relaxing as he waits through a full silent count.","Breathing and faint corridor ambience."), | |
| shot(10,["<char2>"],"A medium mirror composition shows <Subject 1> repeat the transfer with less sway and a longer central pause.","Shoes brush the floor."), | |
| shot(11,["<char2>"],"<Subject 1> walks to the window side, opens the curtain slightly, and returns as softer daylight spreads across the studio.","Curtain rings and city ambience."), | |
| shot(12,["<char2>"],"A lateral follow tracks <Subject 1> through three slow steps across the new patch of light.","Even foot taps and cloth movement."), | |
| shot(13,["<char2>"],"<Subject 1> sits briefly on the floor edge, then stands using the wall rail without urgency.","A hand on wood and calm breathing."), | |
| shot(14,["<char2>"],"From over his shoulder, the rear door and mirror align; two familiar reflections approach before the actual doorway figures appear.","Corridor footsteps draw closer."), | |
| shot(15,["<char3>","<char1>","<char2>"],"A wide reappearance shot shows <Subject 1> and <Subject 2> enter through the rear door and join <Subject 3> in a spacious triangle, with the teal wrap jacket and silver bracelet clearly matching the earlier teacher.","Three sets of soft shoes and the same teacher speaks.",[line("<char3>","Your pace is settled now. Let us use the same slow count with all three of us in view.")]) | |
| ] | |
| }, | |
| { | |
| "case_id":"worker_15_tier2","tier":2,"target_identity":"<char3>", | |
| "first_appearance_shot":5,"reappearance_shot":13,"absence_gap":7, | |
| "characters":{ | |
| "<char1>":"a middle-aged East Asian woman with shoulder-length black hair, a crimson parka, black trousers, and a small gray backpack", | |
| "<char2>":"an elderly Black man with a close white beard, a camel wool coat, dark trousers, and a burgundy knit cap", | |
| "<char3>":"a young white woman with a blond pixie cut, a navy cable-car uniform, a bright yellow scarf, and black platform shoes" | |
| }, | |
| "shot_specs":[ | |
| shot(1,["<char1>"],"A wide establishing shot shows <Subject 1> leave the glass waiting hall and approach the mountain cable-car platform as clouds thin above the valley.","Station machinery and one visitor speaks.",[line("<char1>","The platform is moving slowly enough now. I will wait behind the line until the cabin arrives.")]), | |
| shot(2,["<char2>"],"A medium shot frames <Subject 1> near the glass wall as an empty cabin glides past without stopping.","Cable wheels and one reply.",[line("<char2>","I can board after you. I would like one clear hand on the rail.")]), | |
| shot(3,["<char1>","<char2>"],"A lateral follow tracks both visitors along the yellow line while another cabin approaches through the open station mouth.","Cable hum and measured steps."), | |
| shot(4,["<char2>","<char1>"],"An over-the-shoulder view behind <Subject 1> shows <Subject 2> and the slowing cabin reflected together in the glass wall.","Cabin rollers and wind outside."), | |
| shot(5,["<char3>","<char1>","<char2>"],"<Subject 1> walks in from the safe-side passage, explains the boarding rhythm, then continues beside the moving cabins toward the outer control walkway.","Station mechanisms and one clear staff voice.",[line("<char3>","Let this cabin pass. I will confirm the next one is empty and meet you beside its door.")]), | |
| shot(6,["<char1>","<char2>"],"A fixed wide shot holds both visitors behind the line while the first cabin passes and brighter valley light reaches the platform.","Rollers, cable hum, and no speech."), | |
| shot(7,["<char1>"],"A close shot shows <Subject 1> tighten one backpack strap and look toward the next cabin without stepping forward.","A buckle and station machinery."), | |
| shot(8,["<char2>"],"<Subject 1> moves one position nearer the marked boarding point and places one hand near the stationary inner rail.","Shoes, cable wheels, and wind."), | |
| shot(9,["<char1>","<char2>"],"A medium two-shot shows the visitors exchange positions so <Subject 1> can board first while <Subject 2> keeps the rail side.","Cabin approach and light footsteps."), | |
| shot(10,["<char2>","<char1>"],"A wide view through the station opening reveals the next empty cabin climbing toward them against a now-sunlit mountain slope.","Cable hum and distant wind."), | |
| shot(11,["<char1>"],"<Subject 1> walks parallel to the cabin for two slow steps, practicing the pace before returning behind the line.","Platform shoes and rolling machinery."), | |
| shot(12,["<char2>","<char1>"],"From over <Subject 1>'s shoulder, the empty cabin door aligns with <Subject 2> and the safe-side passage beyond.","A warning tone sounds once."), | |
| shot(13,["<char3>"],"A medium reappearance shot shows <Subject 1> walking back along the safe-side passage beside the empty cabin, her yellow scarf and navy uniform matching her earlier appearance.","Cabin rollers and the same staff voice.",[line("<char3>","This cabin is empty and steady. Walk beside it for two steps, then take the inner rail.")]), | |
| shot(14,["<char1>","<char2>","<char3>"],"A wide final shot shows <Subject 3> pace beside the cabin while <Subject 1> boards first and <Subject 2> follows with one hand on the inner rail.","Cabin wheels, soft steps, and wind outside; no dialogue.") | |
| ] | |
| } | |
| ] | |
| def main(): | |
| cases=[compile_case(case) for case in CASES] | |
| OUT.write_text(json.dumps(cases,ensure_ascii=False,indent=2)+"\n",encoding="utf-8") | |
| print(json.dumps({"cases":len(cases),"shots":sum(len(c["shots"]) for c in cases),"output":str(OUT)},indent=2)) | |
| if __name__=="__main__": | |
| main() | |