diff --git a/shot_camera.py b/shot_camera.py index 59de535f..659f0e9d 100644 --- a/shot_camera.py +++ b/shot_camera.py @@ -34,11 +34,11 @@ _CAMERA_VERBS = (r"(?:moves?|pushes|pulls|pans|tilts|zooms|tracks|follows|drifts CAMERA = re.compile( r"\b(?:zoom(?:s|ed|ing)?\s+(?:in|out)|zoom-(?:in|out)|dolly|rack(?:s|ing)? focus|close-?up|" r"handheld|wide shot|wide-angle shot|tracking shot|crane shot|static shot|whip pan|" - r"push[- ]in|pull[- ]out|camera shake)\b" + r"camera shake)\b" r"|\bcamera(?:'s)?\s+(?:\w+ly\s+)?" + _CAMERA_VERBS + r"\b" r"|\bcamera(?:'s)? (?:movement|motion|move)\b" r"|(?:^|[.!?]\s+)(?:slowly |quickly |smoothly )?(?:pan|tilt|truck|pedestal|arc|orbit|roll|" - r"push in|pull out|pull back|zoom|track|dolly|crane)\b", + r"zoom|track|dolly|crane)\b", re.I) GENERIC = {"camera", "video", "scene", "shot", "frame", "background", "foreground", "view", "image", "screen", "moment", "time", "way", "side", "front", "middle", "one", diff --git a/tests/test_shot_camera.py b/tests/test_shot_camera.py index 363dcb0a..6e991e47 100644 --- a/tests/test_shot_camera.py +++ b/tests/test_shot_camera.py @@ -170,6 +170,8 @@ def test_a_shot_that_opens_with_a_cut_is_not_taken_for_having_a_camera_move(): " rolls onto 's side and pulls out a knife.", " looks at the camera and smiles, pushes in the last piece.", "'s back arcs, then focuses on the screen.", + " starts to pull out slowly and pushes in again, then will push in once more.", + "Pull out slowly. Push in deeper.", " moves up and down, then pans 's gaze across the room.", ]) def test_body_movement_and_looking_at_the_camera_are_not_camera_moves(text): @@ -184,6 +186,8 @@ def test_body_movement_and_looking_at_the_camera_are_not_camera_moves(text): "A tracking shot follows .", "Rack focus to the window.", "The camera slowly drifts upward.", + "The camera pulls back to a wider view.", + "The camera pushes in toward .", ]) def test_real_camera_moves_are_still_found(text): assert sc.CAMERA.search(sc.CUT.sub("", text)) @@ -362,6 +366,7 @@ def test_cut_times_split_the_scene_evenly_with_no_tiny_shots(): assert sc.add_shot_cuts(P, 4)[1]["times"] == ["00:01.000", "00:02.000", "00:03.000"] -def test_no_phrase_reads_as_the_camera_pulling_something_out(): +def test_the_phrases_we_write_never_say_the_camera_pulls_out(): + """Only what the rewriter writes; a shortcut may say it as an action.""" for group in (sc.MOVES_DETAIL, sc.MOVES_OTHER, sc.MOVES_TRAVEL, sc.MOVES_THEN, sc.MOVES_FINISH): assert not any("pulls out" in m for m in group), group