-
Notifications
You must be signed in to change notification settings - Fork 18
Add JSON CLI output and publishable ClawHub skill bundle #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # CameraCapture Agent Entry | ||
|
|
||
| This repository includes a publish-ready ClawHub/OpenClaw skill for `ccap`. | ||
|
|
||
| If you need to install or use `ccap` as a tool for camera capture, device inspection, image capture, or video metadata inspection, read the published skill folder first: | ||
|
|
||
| - [skills/ccap/SKILL.md](skills/ccap/SKILL.md) | ||
|
|
||
| Use that skill when the task involves any of the following: | ||
|
|
||
| - install ccap on the current machine | ||
| - build CameraCapture from source | ||
| - use Homebrew to install ccap on macOS | ||
| - download and run a release binary when no build toolchain is available | ||
| - list camera devices | ||
| - inspect device capabilities | ||
| - capture frames with the CLI | ||
| - inspect video metadata | ||
|
|
||
| The `.github/skills/` directory is for repository-local development workflows. | ||
| The `skills/ccap/` directory is the standalone skill bundle intended for ClawHub/OpenClaw distribution. | ||
|
|
||
| Prefer the `ccap` CLI over calling internal source files directly. | ||
| Prefer structured JSON output when the command supports `--json`. | ||
| Do not assume camera permission, GUI availability, or video file playback support on every platform. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -124,9 +124,15 @@ int main(int argc, char* argv[]) { | |
| return ccap_cli::convertYuvToImage(opts); | ||
| } | ||
|
|
||
| // Check if we should just print info (no action specified) | ||
| bool hasAction = opts.enablePreview || opts.saveFrames || opts.captureCountSpecified || !opts.outputDir.empty(); | ||
|
|
||
| // Check if video file playback is requested but not supported on Linux | ||
| #if defined(__linux__) || defined(__linux) || defined(linux) || defined(__gnu_linux__) | ||
| if (!opts.videoFilePath.empty()) { | ||
| if (!hasAction) { | ||
| return ccap_cli::printVideoInfo(opts, opts.videoFilePath); | ||
| } | ||
| std::cerr << "Error: Video file playback is not supported on Linux.\n" | ||
| << "\n" | ||
| << "Video file playback is currently only available on:\n" | ||
|
|
@@ -142,12 +148,9 @@ int main(int argc, char* argv[]) { | |
| } | ||
| #endif | ||
|
|
||
| // Check if we should just print info (no action specified) | ||
| bool hasAction = opts.enablePreview || opts.saveFrames || opts.captureCountSpecified || !opts.outputDir.empty(); | ||
|
|
||
| // If video file specified without action, print video info | ||
| if (!opts.videoFilePath.empty() && !hasAction) { | ||
| return ccap_cli::printVideoInfo(opts.videoFilePath); | ||
| return ccap_cli::printVideoInfo(opts, opts.videoFilePath); | ||
|
Comment on lines
151
to
+153
|
||
| } | ||
|
|
||
| // If camera device specified without action, print camera info | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.