diff --git a/auto_editor/formats/json.py b/auto_editor/formats/json.py index 09e2e4e57..a7916b327 100644 --- a/auto_editor/formats/json.py +++ b/auto_editor/formats/json.py @@ -79,7 +79,7 @@ def __init__(self, name: str, *attrs: tuple[str, Any, Any]): ) visual_objects = { - "rectangle": (TlRect, rect_builder), + "rect": (TlRect, rect_builder), "image": (TlImage, img_builder), "video": (TlVideo, video_builder), } diff --git a/auto_editor/help.py b/auto_editor/help.py index 3f560a4b9..32015dab0 100644 --- a/auto_editor/help.py +++ b/auto_editor/help.py @@ -222,7 +222,7 @@ - opacity threshold? : 1.0 - anchor str? : "ce" - - rectangle + - rect - start, dur nat? - x, y int? - width int? diff --git a/auto_editor/subcommands/test.py b/auto_editor/subcommands/test.py index ad15e2e46..17f35f25e 100644 --- a/auto_editor/subcommands/test.py +++ b/auto_editor/subcommands/test.py @@ -384,7 +384,7 @@ def resolution_and_scale(): def obj_makes_video(): out = run.main( ["resources/new-commentary.mp3"], - ["--add", 'rectangle:0,30,0,0,300,300,fill="blue"'], + ["--add", 'rect:0,30,0,0,300,300,fill="blue"'], "out.mp4", ) cn = checker.check(out) @@ -397,7 +397,7 @@ def obj_makes_video(): return out def various_errors(): - run.check(["example.mp4", "--add", "rectangle:0,60", "--cut-out", "60,end"]) + run.check(["example.mp4", "--add", "rect:0,60", "--cut-out", "60,end"]) def render_video_objs(): out = run.main( @@ -406,7 +406,7 @@ def render_video_objs(): "--mark_as_loud", "start,end", "--add", - 'rectangle:0,30,0,200,100,300,fill="#43FA56"', + 'rect:0,30,0,200,100,300,fill="#43FA56"', ], ) return out diff --git a/auto_editor/timeline.py b/auto_editor/timeline.py index 62f186ed1..93c034020 100644 --- a/auto_editor/timeline.py +++ b/auto_editor/timeline.py @@ -119,7 +119,7 @@ class TlRect: pAttr("fill", "#c4c4c4", is_str), ) visual_objects = { - "rectangle": (TlRect, rect_builder), + "rect": (TlRect, rect_builder), "image": (TlImage, img_builder), "video": (TlVideo, video_builder), } diff --git a/auto_editor/utils/cmdkw.py b/auto_editor/utils/cmdkw.py index cc08d4aee..a4cd91033 100644 --- a/auto_editor/utils/cmdkw.py +++ b/auto_editor/utils/cmdkw.py @@ -93,9 +93,9 @@ def parse_with_palet( from auto_editor.lib.err import MyError # Positional Arguments - # --rectangle 0,end,10,20,20,30,#000, ... + # --option 0,end,10,20,20,30,#000, ... # Keyword Arguments - # --rectangle start=0,dur=end,x1=10, ... + # --option start=0,dur=end,x1=10, ... KEYWORD_SEP = "=" kwargs: dict[str, Any] = {}