devbits 0.1.1__tar.gz → 0.1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: devbits
3
- Version: 0.1.1
3
+ Version: 0.1.3
4
4
  Summary: A lightweight CLI toolkit for daily development utilities.
5
5
  Author: Bruce Chuang
6
6
  License-Expression: MIT
@@ -1,3 +1,3 @@
1
1
  """devbits: A lightweight CLI toolkit for daily development utilities."""
2
2
 
3
- __version__ = "0.1.1"
3
+ __version__ = "0.1.3"
@@ -55,7 +55,7 @@ def build_parser() -> argparse.ArgumentParser:
55
55
  p.set_defaults(func=cmd_video2gif)
56
56
 
57
57
  p = sub.add_parser("clipvideo", help="Clip video by seconds or frame indices.")
58
- p.add_argument("video", type=Path)
58
+ p.add_argument("video", type=Path, nargs="?", default=None)
59
59
  p.add_argument("-o", "--output", type=Path, default=Path("clip.mp4"))
60
60
  p.add_argument("--start", type=float)
61
61
  p.add_argument("--end", type=float)
@@ -160,6 +160,8 @@ def cmd_clipvideo(args: argparse.Namespace) -> None:
160
160
  from .gui import launch_gui
161
161
  launch_gui(args.video)
162
162
  return
163
+ if args.video is None:
164
+ raise ValueError("video path is required when --gui is not specified")
163
165
  print(clip_video(ensure_exists(args.video), args.output, args.start, args.end, args.start_frame, args.end_frame))
164
166
 
165
167