Skip to content

Commit

Permalink
Shorten to rect
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBlue committed Oct 24, 2023
1 parent c9ad519 commit 0b0016e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion auto_editor/formats/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
Expand Down
2 changes: 1 addition & 1 deletion auto_editor/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
- opacity threshold? : 1.0
- anchor str? : "ce"
- rectangle
- rect
- start, dur nat?
- x, y int?
- width int?
Expand Down
6 changes: 3 additions & 3 deletions auto_editor/subcommands/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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(
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion auto_editor/timeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
Expand Down
4 changes: 2 additions & 2 deletions auto_editor/utils/cmdkw.py
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {}
Expand Down

0 comments on commit 0b0016e

Please sign in to comment.