FrameForge/frame_forge/cli_utils.py

8 lines
223 B
Python
Raw Permalink Normal View History

import re
def frame_list(frames: str) -> list:
if not re.match(r"\d+(?::\d+)*$", frames):
raise ValueError("Input must be in the format of int:int i.e. 101:104")
return [int(x) for x in frames.split(":")]