Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &cobra.Command{ Use: "cache <path...>", Short: "Generate color cache from images or videos", Example: ` # Cache from a video rong cache path/to/video.mkv # Cache from a image rong cache path/to/image.webp # Cache all png in a directory rong cache path/to/*.png # Recursively cache all image and video in a directory rong cache path/to/directory `, Args: cobra.MinimumNArgs(1), PreRun: func(cmd *cobra.Command, _ []string) { viper.BindPFlags(cmd.Flags()) }, RunE: func(cmd *cobra.Command, args []string) error { ctx := cmd.Context() frames, _ := cmd.Flags().GetInt("frames") workers, _ := cmd.Flags().GetInt("workers") paths, err := ScanPaths(ctx, args) if err != nil { return err } if len(paths) == 0 { fmt.Println("No files found to process") return nil } model := newModel(ctx, paths, frames, workers) p := tea.NewProgram(model) if _, err := p.Run(); err != nil { return fmt.Errorf("error running program: %w", err) } return nil }, }
Command is cache command
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.