summaryrefslogtreecommitdiff
path: root/internal/cli
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-21 22:34:55 +0300
committerPaul Buetow <paul@buetow.org>2026-04-21 22:34:55 +0300
commitd558ed55df855e3ce01b19e7f1b1fe44dce8e64a (patch)
tree8285bce505da6384a9d430af6aef9834b90d96d4 /internal/cli
parentd773e26b19dcea2f4a1917ebb6edaa4f5721693f (diff)
Audit stripped comicgen leftovers
Diffstat (limited to 'internal/cli')
-rw-r--r--internal/cli/video_runner.go21
-rw-r--r--internal/cli/video_runner_test.go44
2 files changed, 0 insertions, 65 deletions
diff --git a/internal/cli/video_runner.go b/internal/cli/video_runner.go
deleted file mode 100644
index 9e888fb..0000000
--- a/internal/cli/video_runner.go
+++ /dev/null
@@ -1,21 +0,0 @@
-package cli
-
-import (
- "codeberg.org/snonux/totalrecall/internal/video"
-)
-
-// GenerateSelectedVideos is the CLI runner that animates gallery PNG files
-// into MP4 clips using Google's Veo model. It delegates to the video package
-// so GUI and tests can keep using the cli entry point without importing video
-// directly.
-//
-// apiKey is the Google/Gemini API key passed by the caller.
-// selectedPaths contains the absolute (or relative) paths of the PNGs to animate.
-//
-// Each page prints a "Generating…" line before the API call and a "Video saved:"
-// line with the output path on success. The MP4 is written next to its source
-// PNG so that gallery images and their videos stay in the same directory.
-// The function stops and returns on the first error so the caller can log it.
-func GenerateSelectedVideos(apiKey string, selectedPaths []string) error {
- return video.GenerateSelectedVideos(apiKey, selectedPaths)
-}
diff --git a/internal/cli/video_runner_test.go b/internal/cli/video_runner_test.go
deleted file mode 100644
index 1fd201d..0000000
--- a/internal/cli/video_runner_test.go
+++ /dev/null
@@ -1,44 +0,0 @@
-package cli
-
-import (
- "testing"
-)
-
-// TestGenerateSelectedVideos_EmptyPaths verifies that GenerateSelectedVideos
-// returns nil immediately when no paths are provided, without attempting any
-// API calls.
-func TestGenerateSelectedVideos_EmptyPaths(t *testing.T) {
- err := GenerateSelectedVideos("any-api-key", []string{})
- if err != nil {
- t.Fatalf("expected nil for empty paths, got: %v", err)
- }
-}
-
-// TestGenerateSelectedVideos_NilPaths verifies that GenerateSelectedVideos
-// handles a nil slice the same way as an empty slice.
-func TestGenerateSelectedVideos_NilPaths(t *testing.T) {
- err := GenerateSelectedVideos("any-api-key", nil)
- if err != nil {
- t.Fatalf("expected nil for nil paths, got: %v", err)
- }
-}
-
-// TestGenerateSelectedVideos_EmptyAPIKey verifies that GenerateSelectedVideos
-// returns an error when a non-empty path list is provided but the API key is
-// empty. The error originates from video.NewVeoGenerator, so we just check
-// that some error is returned without making any real API calls.
-func TestGenerateSelectedVideos_EmptyAPIKey(t *testing.T) {
- err := GenerateSelectedVideos("", []string{"/some/word_gallery_1.png"})
- if err == nil {
- t.Fatal("expected error for empty API key with non-empty paths, got nil")
- }
-}
-
-// TestGenerateSelectedVideos_WhitespaceAPIKey verifies that a whitespace-only
-// API key is treated equivalently to an empty key when paths are supplied.
-func TestGenerateSelectedVideos_WhitespaceAPIKey(t *testing.T) {
- err := GenerateSelectedVideos(" ", []string{"/some/word_gallery_1.png"})
- if err == nil {
- t.Fatal("expected error for whitespace API key with non-empty paths, got nil")
- }
-}