Added gm completer (GraphicsMagick) (#2744)

* Added gm completer

* Update completers/gm_completer/cmd/time.go

Co-authored-by: Ralf Steube <rsteube@users.noreply.github.com>

* Update completers/gm_completer/cmd/time.go

---------

Co-authored-by: Ralf Steube <rsteube@users.noreply.github.com>
This commit is contained in:
Saurabh Kushwah 2025-04-05 20:38:56 +05:30 committed by GitHub
parent 4f6e1ccc61
commit 6199d89ddb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
18 changed files with 1050 additions and 0 deletions

View File

@ -0,0 +1,33 @@
package action
import (
"regexp"
"strings"
"github.com/carapace-sh/carapace"
)
func ActionColor() carapace.Action {
return carapace.ActionExecCommand("gm", "convert", "-list", "color")(func(output []byte) carapace.Action {
re := regexp.MustCompile(`^(\S+)\s+([0-9]+,\s*[0-9]+,\s*[0-9]+)\s+(.*)$`)
lines := strings.Split(string(output), "\n")
if len(lines) <= 4 {
return carapace.ActionValues()
}
completions := make([]string, 0, len(lines)-4)
for _, line := range lines[4:] {
matches := re.FindStringSubmatch(strings.TrimSpace(line))
if len(matches) != 4 {
continue
}
value, rgb, compliance := matches[1], matches[2], strings.TrimSpace(matches[3])
completions = append(completions, value, rgb+" ("+compliance+")")
}
return carapace.ActionValuesDescribed(completions...)
})
}

View File

@ -0,0 +1,68 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var animateCmd = &cobra.Command{
Use: "animate",
Short: "animate a sequence of images",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(animateCmd).Standalone()
animateCmd.Flags().StringSliceS("authenticate", "authenticate", []string{}, "decrypt image with this password")
animateCmd.Flags().CountS("backdrop", "backdrop", "display image centered on a backdrop")
animateCmd.Flags().StringSliceS("background", "background", []string{}, "the background color")
animateCmd.Flags().StringSliceS("bordercolor", "bordercolor", []string{}, "the border color")
animateCmd.Flags().StringSliceS("borderwidth", "borderwidth", []string{}, "the border width")
animateCmd.Flags().StringSliceS("colormap", "colormap", []string{}, "Shared or Private")
animateCmd.Flags().CountS("colors", "colors", "preferred number of colors in the image")
animateCmd.Flags().StringSliceS("colorspace", "colorspace", []string{}, "alternate image colorspace")
animateCmd.Flags().StringSliceS("debug", "debug", []string{}, "display copious debugging information")
animateCmd.Flags().StringSliceS("define", "define", []string{}, "Coder/decoder specific options")
animateCmd.Flags().StringSliceS("delay", "delay", []string{}, "display the next image after pausing")
animateCmd.Flags().StringSliceS("density", "density", []string{}, "horizontal and vertical density of the image")
animateCmd.Flags().StringSliceS("depth", "depth", []string{}, "image depth")
animateCmd.Flags().StringSliceS("display", "display", []string{}, "display image to this X server")
animateCmd.Flags().CountS("dither", "dither", "apply Floyd/Steinberg error diffusion to image")
animateCmd.Flags().StringSliceS("font", "font", []string{}, "use this font when annotating the image with text")
animateCmd.Flags().StringSliceS("foreground", "foreground", []string{}, "define the foreground color")
animateCmd.Flags().StringSliceS("gamma", "gamma", []string{}, "level of gamma correction")
animateCmd.Flags().StringSliceS("geometry", "geometry", []string{}, "preferred size and location of the cropped image")
animateCmd.Flags().BoolS("help", "help", false, "print program options")
animateCmd.Flags().StringSliceS("iconGeometry", "iconGeometry", []string{}, "specify the icon geometry")
animateCmd.Flags().StringSliceS("iconic", "iconic", []string{}, "iconic animation")
animateCmd.Flags().StringSliceS("interlace", "interlace", []string{}, "None, Line, Plane, or Partition")
animateCmd.Flags().StringSliceS("limit", "limit", []string{}, "Disk, File, Map, Memory, Pixels, Width, Height, Threads, Read, or Write resource limit")
animateCmd.Flags().StringSliceS("log", "log", []string{}, "format of debugging information")
animateCmd.Flags().StringSliceS("map", "map", []string{}, "display image using this Standard Colormap")
animateCmd.Flags().CountS("matte", "matte", "store matte channel if the image has one")
animateCmd.Flags().StringSliceS("mattecolor", "mattecolor", []string{}, "specify the color to be used with the -frame option")
animateCmd.Flags().CountS("monitor", "monitor", "show progress indication")
animateCmd.Flags().CountS("monochrome", "monochrome", "transform image to black and white")
animateCmd.Flags().StringSliceS("name", "name", []string{}, "name an image")
animateCmd.Flags().CountS("noop", "noop", "do not apply options to image")
animateCmd.Flags().CountS("pause", "pause", "seconds to pause before reanimating")
animateCmd.Flags().StringSliceS("remote", "remote", []string{}, "execute a command in a remote display process")
animateCmd.Flags().StringSliceS("rotate", "rotate", []string{}, "apply Paeth rotation to the image")
animateCmd.Flags().StringSliceS("sampling-factor", "sampling-factor", []string{}, "horizontal and vertical sampling factors")
animateCmd.Flags().StringSliceS("scenes", "scenes", []string{}, "image scene range")
animateCmd.Flags().CountS("shared-memory", "shared-memory", "use shared memory")
animateCmd.Flags().StringSliceS("size", "size", []string{}, "width and height of image")
animateCmd.Flags().StringSliceS("title", "title", []string{}, "assign title to displayed image")
animateCmd.Flags().StringSliceS("treedepth", "treedepth", []string{}, "color tree depth")
animateCmd.Flags().CountS("trim", "trim", "trim image edges")
animateCmd.Flags().StringSliceS("type", "type", []string{}, "image type")
animateCmd.Flags().BoolS("verbose", "verbose", false, "print detailed information about the image")
animateCmd.Flags().BoolS("version", "version", false, "print version information")
animateCmd.Flags().StringSliceS("virtual-pixel", "virtual-pixel", []string{}, "Constant, Edge, Mirror, or Tile")
animateCmd.Flags().StringSliceS("visual", "visual", []string{}, "display image using this visual type")
animateCmd.Flags().StringSliceS("window", "window", []string{}, "display image to background of this window")
rootCmd.AddCommand(animateCmd)
carapace.Gen(animateCmd).PositionalAnyCompletion(carapace.ActionFiles())
}

View File

@ -0,0 +1,37 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var batchCmd = &cobra.Command{
Use: "batch",
Short: "issue multiple commands in interactive or batch mode",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(batchCmd).Standalone()
batchCmd.Flags().StringS("echo", "echo", "", "echo command back to standard out")
batchCmd.Flags().StringS("escape", "escape", "", "force use Unix or Windows escape format for command line argument parsing")
batchCmd.Flags().StringS("fail", "fail", "", "when feedback is on, output the designated text if the command returns error")
batchCmd.Flags().StringS("feedback", "feedback", "", "print text (see -pass and -fail options) feedback after each command to indicate the result")
batchCmd.Flags().BoolS("help", "help", false, "print program options")
batchCmd.Flags().StringS("pass", "pass", "", "when feedback is on, output the designated text if the command executed successfully")
batchCmd.Flags().StringS("prompt", "prompt", "", "use the given text as command prompt")
batchCmd.Flags().StringS("stop-on-error", "stop-on-error", "", "when turned on, batch execution quits prematurely when any command returns error")
batchCmd.Flags().StringS("tap-mode", "tap-mode", "", "Enables or disables Test Anything Protocol (TAP) output for test results")
rootCmd.AddCommand(batchCmd)
carapace.Gen(batchCmd).FlagCompletion(carapace.ActionMap{
"echo": carapace.ActionValues("on", "off"),
"escape": carapace.ActionValues("unix", "windows"),
"feedback": carapace.ActionValues("on", "off"),
"stop-on-error": carapace.ActionValues("on", "off"),
"tap-mode": carapace.ActionValues("on", "off"),
})
carapace.Gen(batchCmd).PositionalCompletion(carapace.ActionFiles())
}

View File

@ -0,0 +1,25 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var benchmarkCmd = &cobra.Command{
Use: "benchmark",
Short: "benchmark one of the other command",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(benchmarkCmd).Standalone()
benchmarkCmd.Flags().BoolS("concurrent", "concurrent", false, "run multiple commands in parallel")
benchmarkCmd.Flags().IntS("duration", "duration", 0, "duration to run benchmark (in seconds)")
benchmarkCmd.Flags().IntS("iterations", "iterations", 0, "number of command iterations per benchmark")
benchmarkCmd.Flags().BoolS("rawcsv", "rawcsv", false, "CSV output (threads,iterations,user_time,elapsed_time)")
benchmarkCmd.Flags().IntS("stepthreads", "stepthreads", 0, "step benchmark with increasing number of threads")
rootCmd.AddCommand(benchmarkCmd)
carapace.Gen(benchmarkCmd).PositionalAnyCompletion(carapace.ActionFiles())
}

View File

@ -0,0 +1,52 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/completers/gm_completer/cmd/action"
"github.com/spf13/cobra"
)
var compareCmd = &cobra.Command{
Use: "compare",
Short: "compare two images",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(compareCmd).Standalone()
compareCmd.Flags().StringSliceS("authenticate", "authenticate", []string{}, "decrypt image with this password")
compareCmd.Flags().CountS("auto-orient", "auto-orient", "orient (rotate) images so they are upright")
compareCmd.Flags().StringSliceS("colorspace", "colorspace", []string{}, "alternate image colorspace")
compareCmd.Flags().StringSliceS("compress", "compress", []string{}, "image compression type")
compareCmd.Flags().StringSliceS("debug", "debug", []string{}, "display copious debugging information")
compareCmd.Flags().StringSliceS("define", "define", []string{}, "coder/decoder specific options")
compareCmd.Flags().StringSliceS("density", "density", []string{}, "horizontal and vertical density of the image")
compareCmd.Flags().StringSliceS("depth", "depth", []string{}, "image depth")
compareCmd.Flags().StringSliceS("display", "display", []string{}, "get image or font from this X server")
compareCmd.Flags().StringSliceS("endian", "endian", []string{}, "multibyte word order (LSB, MSB, or Native)")
compareCmd.Flags().StringSliceS("file", "file", []string{}, "write difference image to this file")
compareCmd.Flags().BoolS("help", "help", false, "print program options")
compareCmd.Flags().StringSliceS("highlight-color", "highlight-color", []string{}, "color to use when annotating difference pixels")
compareCmd.Flags().StringSliceS("highlight-style", "highlight-style", []string{}, "pixel highlight style (assign, threshold, tint, xor)")
compareCmd.Flags().StringSliceS("interlace", "interlace", []string{}, "None, Line, Plane, or Partition")
compareCmd.Flags().StringSliceS("limit", "limit", []string{}, "Disk, File, Map, Memory, Pixels, Width, Height, Threads, Read, or Write resource limit")
compareCmd.Flags().StringSliceS("log", "log", []string{}, "format of debugging information")
compareCmd.Flags().CountS("matte", "matte", "store matte channel if the image has one")
compareCmd.Flags().CountS("maximum-error", "maximum-error", "maximum total difference before returning error")
compareCmd.Flags().CountS("metric", "metric", "comparison metric (MAE, MSE, PAE, PSNR, RMSE)")
compareCmd.Flags().CountS("monitor", "monitor", "show progress indication")
compareCmd.Flags().StringSliceS("sampling-factor", "sampling-factor", []string{}, "horizontal and vertical sampling factors")
compareCmd.Flags().StringSliceS("size", "size", []string{}, "width and height of image")
compareCmd.Flags().StringSliceS("type", "type", []string{}, "image type")
compareCmd.Flags().BoolS("verbose", "verbose", false, "print detailed information about the image")
compareCmd.Flags().BoolS("version", "version", false, "print version information")
rootCmd.AddCommand(compareCmd)
carapace.Gen(compareCmd).FlagCompletion(carapace.ActionMap{
"file": carapace.ActionFiles(),
"highlight-color": action.ActionColor(),
})
carapace.Gen(compareCmd).PositionalAnyCompletion(carapace.ActionFiles())
}

View File

@ -0,0 +1,82 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var compositeCmd = &cobra.Command{
Use: "composite",
Short: "composite images together",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(compositeCmd).Standalone()
compositeCmd.Flags().StringSliceS("affine", "affine", []string{}, "affine transform matrix")
compositeCmd.Flags().StringSliceS("authenticate", "authenticate", []string{}, "decrypt image with this password")
compositeCmd.Flags().StringSliceS("blue-primary", "blue-primary", []string{}, "chomaticity blue primary point")
compositeCmd.Flags().CountS("colors", "colors", "preferred number of colors in the image")
compositeCmd.Flags().StringSliceS("colorspace", "colorspace", []string{}, "alternate image colorspace")
compositeCmd.Flags().StringSliceS("comment", "comment", []string{}, "annotate image with comment")
compositeCmd.Flags().StringSliceS("compose", "compose", []string{}, "composite operator")
compositeCmd.Flags().StringSliceS("compress", "compress", []string{}, "image compression type")
compositeCmd.Flags().StringSliceS("debug", "debug", []string{}, "display copious debugging information")
compositeCmd.Flags().StringSliceS("define", "define", []string{}, "Coder/decoder specific options")
compositeCmd.Flags().StringSliceS("density", "density", []string{}, "horizontal and vertical density of the image")
compositeCmd.Flags().StringSliceS("depth", "depth", []string{}, "image depth")
compositeCmd.Flags().StringSliceS("displace", "displace", []string{}, "shift image pixels defined by a displacement map")
compositeCmd.Flags().StringSliceS("display", "display", []string{}, "get image or font from this X server")
compositeCmd.Flags().StringSliceS("dispose", "dispose", []string{}, "Undefined, None, Background, Previous")
compositeCmd.Flags().StringSliceS("dissolve", "dissolve", []string{}, "dissolve the two images a given percent")
compositeCmd.Flags().CountS("dither", "dither", "apply Floyd/Steinberg error diffusion to image")
compositeCmd.Flags().StringSliceS("encoding", "encoding", []string{}, "text encoding type")
compositeCmd.Flags().StringSliceS("endian", "endian", []string{}, "multibyte word order (LSB, MSB, or Native)")
compositeCmd.Flags().StringSliceS("filter", "filter", []string{}, "use this filter when resizing an image")
compositeCmd.Flags().CountS("flag", "flag", "affine transform image")
compositeCmd.Flags().StringSliceS("font", "font", []string{}, "render text with this font")
compositeCmd.Flags().StringSliceS("geometry", "geometry", []string{}, "location of the composite image")
compositeCmd.Flags().StringSliceS("gravity", "gravity", []string{}, "which direction to gravitate towards")
compositeCmd.Flags().StringSliceS("green-primary", "green-primary", []string{}, "chomaticity green primary point")
compositeCmd.Flags().BoolS("help", "help", false, "print program options")
compositeCmd.Flags().StringSliceS("interlace", "interlace", []string{}, "None, Line, Plane, or Partition")
compositeCmd.Flags().StringSliceS("label", "label", []string{}, "ssign a label to an image")
compositeCmd.Flags().StringSliceS("limit", "limit", []string{}, "Disk, File, Map, Memory, Pixels, Width, Height, Threads, Read, or Write resource limit")
compositeCmd.Flags().StringSliceS("log", "log", []string{}, "format of debugging information")
compositeCmd.Flags().CountS("matte", "matte", "store matte channel if the image has one")
compositeCmd.Flags().CountS("monitor", "monitor", "show progress indication")
compositeCmd.Flags().CountS("monochrome", "monochrome", "transform image to black and white")
compositeCmd.Flags().CountS("negate", "negate", "replace every pixel with its complementary color ")
compositeCmd.Flags().StringSliceS("page", "page", []string{}, "size and location of an image canvas")
compositeCmd.Flags().StringSliceS("profile", "profile", []string{}, "add ICM or IPTC information profile to image")
compositeCmd.Flags().StringSliceS("quality", "quality", []string{}, "JPEG/MIFF/PNG compression level")
compositeCmd.Flags().StringSliceS("recolor", "recolor", []string{}, "apply a color translation matrix to image channels")
compositeCmd.Flags().StringSliceS("red-primary", "red-primary", []string{}, "chomaticity red primary point")
compositeCmd.Flags().StringSliceS("repage", "repage", []string{}, "adjust current page offsets by geometry")
compositeCmd.Flags().StringSliceS("resize", "resize", []string{}, "resize the image")
compositeCmd.Flags().StringSliceS("rotate", "rotate", []string{}, "apply Paeth rotation to the image")
compositeCmd.Flags().StringSliceS("sampling-factor", "sampling-factor", []string{}, "horizontal and vertical sampling factors")
compositeCmd.Flags().StringSliceS("scene", "scene", []string{}, "image scene number")
compositeCmd.Flags().StringSliceS("set", "set", []string{}, "set image attribute")
compositeCmd.Flags().StringSliceS("sharpen", "sharpen", []string{}, "sharpen the image")
compositeCmd.Flags().StringSliceS("size", "size", []string{}, "width and height of image")
compositeCmd.Flags().StringSliceS("stegano", "stegano", []string{}, "hide watermark within an image")
compositeCmd.Flags().CountS("stereo", "stereo", "combine two image to create a stereo anaglyph")
compositeCmd.Flags().CountS("strip", "strip", "strip all profiles and text attributes from image")
compositeCmd.Flags().StringSliceS("thumbnail", "thumbnail", []string{}, "resize the image (optimized for thumbnails)")
compositeCmd.Flags().CountS("tile", "tile", "repeat composite operation across image")
compositeCmd.Flags().StringSliceS("treedepth", "treedepth", []string{}, "color tree depth")
compositeCmd.Flags().StringSliceS("type", "type", []string{}, "image type")
compositeCmd.Flags().StringSliceS("units", "units", []string{}, "PixelsPerInch, PixelsPerCentimeter, or Undefined")
compositeCmd.Flags().StringSliceS("unsharp", "unsharp", []string{}, "sharpen the image")
compositeCmd.Flags().BoolS("verbose", "verbose", false, "print detailed information about the image")
compositeCmd.Flags().BoolS("version", "version", false, "print version information")
compositeCmd.Flags().StringSliceS("virtual-pixel", "virtual-pixel", []string{}, "Constant, Edge, Mirror, or Tile")
compositeCmd.Flags().StringSliceS("watermark", "watermark", []string{}, "percent brightness and saturation of a watermark")
compositeCmd.Flags().StringSliceS("white-point", "white-point", []string{}, "chomaticity white point")
compositeCmd.Flags().StringSliceS("write", "write", []string{}, "write image to this file")
rootCmd.AddCommand(compositeCmd)
carapace.Gen(compositeCmd).PositionalAnyCompletion(carapace.ActionFiles())
}

View File

@ -0,0 +1,25 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var conjureCmd = &cobra.Command{
Use: "conjure",
Short: "execute a Magick Scripting Language (MSL) XML script",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(conjureCmd).Standalone()
conjureCmd.Flags().StringS("debug", "debug", "", "display copious debugging information")
conjureCmd.Flags().BoolS("help", "help", false, "print program options")
conjureCmd.Flags().StringS("log", "log", "", "format of debugging information")
conjureCmd.Flags().BoolS("verbose", "verbose", false, "print detailed information about the image")
conjureCmd.Flags().BoolS("version", "version", false, "print version information")
rootCmd.AddCommand(conjureCmd)
carapace.Gen(conjureCmd).PositionalCompletion(carapace.ActionFiles())
}

View File

@ -0,0 +1,178 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/completers/gm_completer/cmd/action"
"github.com/spf13/cobra"
)
var convertCmd = &cobra.Command{
Use: "convert",
Short: "convert an image or sequence of images",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(convertCmd).Standalone()
convertCmd.Flags().CountS("adjoin", "adjoin", "join images into a single multi-image file")
convertCmd.Flags().StringSliceS("affine", "affine", []string{}, "affine transform matrix")
convertCmd.Flags().CountS("antialias", "antialias", "remove pixel-aliasing")
convertCmd.Flags().CountS("append", "append", "append an image sequence")
convertCmd.Flags().StringSliceS("asc-cdl", "asc-cdl", []string{}, "apply ASC CDL transform")
convertCmd.Flags().StringSliceS("authenticate", "authenticate", []string{}, "decrypt image with this password")
convertCmd.Flags().CountS("auto-orient", "auto-orient", "orient (rotate) image so it is upright")
convertCmd.Flags().CountS("average", "average", "average an image sequence")
convertCmd.Flags().StringSliceS("background", "background", []string{}, "background color")
convertCmd.Flags().StringSliceS("black-threshold", "black-threshold", []string{}, "pixels below the threshold become black")
convertCmd.Flags().StringSliceS("blue-primary", "blue-primary", []string{}, "chomaticity blue primary point")
convertCmd.Flags().StringSliceS("blur", "blur", []string{}, "blur the image")
convertCmd.Flags().StringSliceS("border", "border", []string{}, "surround image with a border of color")
convertCmd.Flags().StringSliceS("bordercolor", "bordercolor", []string{}, "border color")
convertCmd.Flags().StringSliceS("box", "box", []string{}, "set the color of the annotation bounding box")
convertCmd.Flags().StringSliceS("channel", "channel", []string{}, "extract a particular color channel from image")
convertCmd.Flags().StringSliceS("charcoal", "charcoal", []string{}, "simulate a charcoal drawing")
convertCmd.Flags().StringSliceS("chop", "chop", []string{}, "remove pixels from the image interior")
convertCmd.Flags().CountS("clip", "clip", "apply first clipping path if the image has one")
convertCmd.Flags().CountS("clippath", "clippath", "apply named clipping path if the image has one")
convertCmd.Flags().CountS("coalesce", "coalesce", "merge a sequence of images")
convertCmd.Flags().StringSliceS("colorize", "colorize", []string{}, "colorize the image with the fill color")
convertCmd.Flags().CountS("colors", "colors", "preferred number of colors in the image")
convertCmd.Flags().StringSliceS("colorspace", "colorspace", []string{}, "alternate image colorspace")
convertCmd.Flags().StringSliceS("comment", "comment", []string{}, "annotate image with comment")
convertCmd.Flags().StringSliceS("compose", "compose", []string{}, "composite operator")
convertCmd.Flags().StringSliceS("compress", "compress", []string{}, "image compression type")
convertCmd.Flags().CountS("contrast", "contrast", "enhance or reduce the image contrast")
convertCmd.Flags().StringSliceS("convolve", "convolve", []string{}, "convolve image with the specified convolution kernel")
convertCmd.Flags().StringSliceS("crop", "crop", []string{}, "preferred size and location of the cropped image")
convertCmd.Flags().StringSliceS("cycle", "cycle", []string{}, "cycle the image colormap")
convertCmd.Flags().StringSliceS("debug", "debug", []string{}, "display copious debugging information")
convertCmd.Flags().CountS("deconstruct", "deconstruct", "break down an image sequence into constituent parts")
convertCmd.Flags().StringSliceS("define", "define", []string{}, "Coder/decoder specific options")
convertCmd.Flags().StringSliceS("delay", "delay", []string{}, "display the next image after pausing")
convertCmd.Flags().StringSliceS("density", "density", []string{}, "horizontal and vertical density of the image")
convertCmd.Flags().StringSliceS("depth", "depth", []string{}, "image depth")
convertCmd.Flags().CountS("despeckle", "despeckle", "reduce the speckles within an image")
convertCmd.Flags().StringSliceS("display", "display", []string{}, "get image or font from this X server")
convertCmd.Flags().StringSliceS("dispose", "dispose", []string{}, "Undefined, None, Background, Previous")
convertCmd.Flags().CountS("dither", "dither", "apply Floyd/Steinberg error diffusion to image")
convertCmd.Flags().StringSliceS("draw", "draw", []string{}, "annotate the image with a graphic primitive")
convertCmd.Flags().StringSliceS("edge", "edge", []string{}, "apply a filter to detect edges in the image")
convertCmd.Flags().StringSliceS("emboss", "emboss", []string{}, "emboss an image")
convertCmd.Flags().StringSliceS("encoding", "encoding", []string{}, "text encoding type")
convertCmd.Flags().StringSliceS("endian", "endian", []string{}, "multibyte word order (LSB, MSB, or Native)")
convertCmd.Flags().CountS("enhance", "enhance", "apply a digital filter to enhance a noisy image")
convertCmd.Flags().CountS("equalize", "equalize", "perform histogram equalization to an image")
convertCmd.Flags().CountS("extent", "extent", "composite image on background color canvas image")
convertCmd.Flags().StringSliceS("fill", "fill", []string{}, "color to use when filling a graphic primitive")
convertCmd.Flags().StringSliceS("filter", "filter", []string{}, "use this filter when resizing an image")
convertCmd.Flags().CountS("flatten", "flatten", "flatten a sequence of images")
convertCmd.Flags().CountS("flip", "flip", "flip image in the vertical direction")
convertCmd.Flags().CountS("flop", "flop", "flop image in the horizontal direction")
convertCmd.Flags().StringSliceS("font", "font", []string{}, "render text with this font")
convertCmd.Flags().StringSliceS("format", "format", []string{}, "output formatted image info for 'info:' format")
convertCmd.Flags().StringSliceS("frame", "frame", []string{}, "surround image with an ornamental border")
convertCmd.Flags().StringSliceS("fuzz", "fuzz", []string{}, "colors within this distance are considered equal")
convertCmd.Flags().StringSliceS("gamma", "gamma", []string{}, "level of gamma correction")
convertCmd.Flags().StringSliceS("gaussian", "gaussian", []string{}, "gaussian blur an image")
convertCmd.Flags().StringSliceS("geometry", "geometry", []string{}, "preferred size or location of the image")
convertCmd.Flags().StringSliceS("gravity", "gravity", []string{}, "horizontal and vertical text/object placement")
convertCmd.Flags().StringSliceS("green-primary", "green-primary", []string{}, "chomaticity green primary point")
convertCmd.Flags().StringSliceS("hald-clut", "hald-clut", []string{}, "apply a Hald CLUT to the image")
convertCmd.Flags().CountS("help", "help", "print program options")
convertCmd.Flags().StringSliceS("implode", "implode", []string{}, "implode image pixels about the center")
convertCmd.Flags().StringSliceS("intent", "intent", []string{}, "Absolute, Perceptual, Relative, or Saturation")
convertCmd.Flags().StringSliceS("interlace", "interlace", []string{}, "None, Line, Plane, or Partition")
convertCmd.Flags().StringSliceS("label", "label", []string{}, "assign a label to an image")
convertCmd.Flags().StringSliceS("lat", "lat", []string{}, "local adaptive thresholding")
convertCmd.Flags().StringSliceS("level", "level", []string{}, "adjust the level of image contrast")
convertCmd.Flags().StringSliceS("limit", "limit", []string{}, "Disk, File, Map, Memory, Pixels, Width, Height, Threads, Read, or Write resource limit")
convertCmd.Flags().StringSliceS("linewidth", "linewidth", []string{}, "the line width for subsequent draw operations")
convertCmd.Flags().StringSliceS("list", "list", []string{}, "Color, Delegate, Format, Magic, Module, Resource, or Type")
convertCmd.Flags().StringSliceS("log", "log", []string{}, "format of debugging information")
convertCmd.Flags().StringSliceS("loop", "loop", []string{}, "add Netscape loop extension to your GIF animation")
convertCmd.Flags().CountS("magnify", "magnify", "interpolate image to double size")
convertCmd.Flags().StringSliceS("map", "map", []string{}, "transform image colors to match this set of colors")
convertCmd.Flags().StringSliceS("mask", "mask", []string{}, "set the image clip mask")
convertCmd.Flags().CountS("matte", "matte", "store matte channel if the image has one")
convertCmd.Flags().StringSliceS("mattecolor", "mattecolor", []string{}, "specify the color to be used with the -frame option")
convertCmd.Flags().StringSliceS("median", "median", []string{}, "apply a median filter to the image")
convertCmd.Flags().CountS("minify", "minify", "interpolate the image to half size")
convertCmd.Flags().StringSliceS("modulate", "modulate", []string{}, "vary the brightness, saturation, and hue")
convertCmd.Flags().CountS("monitor", "monitor", "show progress indication")
convertCmd.Flags().CountS("monochrome", "monochrome", "transform image to black and white")
convertCmd.Flags().StringSliceS("morph", "morph", []string{}, "morph an image sequence")
convertCmd.Flags().CountS("mosaic", "mosaic", "create a mosaic from an image sequence")
convertCmd.Flags().StringSliceS("motion-blur", "motion-blur", []string{}, "simulate motion blur")
convertCmd.Flags().CountS("negate", "negate", "replace every pixel with its complementary color ")
convertCmd.Flags().StringSliceS("noise", "noise", []string{}, "add or reduce noise in an image")
convertCmd.Flags().CountS("noop", "noop", "do not apply options to image")
convertCmd.Flags().CountS("normalize", "normalize", "transform image to span the full range of colors")
convertCmd.Flags().StringSliceS("opaque", "opaque", []string{}, "change this color to the fill color")
convertCmd.Flags().StringSliceS("operator", "operator", []string{}, "apply a mathematical or bitwise operator to channel")
convertCmd.Flags().StringSliceS("ordered-dither", "ordered-dither", []string{}, "ordered dither the image")
convertCmd.Flags().StringSliceS("orient", "orient", []string{}, "set image orientation attribute")
convertCmd.Flags().StringSliceS("page", "page", []string{}, "size and location of an image canvas")
convertCmd.Flags().StringSliceS("paint", "paint", []string{}, "simulate an oil painting")
convertCmd.Flags().CountS("ping", "ping", "efficiently determine image attributes")
convertCmd.Flags().StringSliceS("pointsize", "pointsize", []string{}, "font point size")
convertCmd.Flags().StringSliceS("preview", "preview", []string{}, "image preview type")
convertCmd.Flags().StringSliceS("profile", "profile", []string{}, "add ICM or IPTC information profile to image")
convertCmd.Flags().StringSliceS("quality", "quality", []string{}, "JPEG/MIFF/PNG compression level")
convertCmd.Flags().StringSliceS("raise", "raise", []string{}, "lighten/darken image edges to create a 3-D effect")
convertCmd.Flags().StringSliceS("random-threshold", "random-threshold", []string{}, "random threshold the image")
convertCmd.Flags().StringSliceS("recolor", "recolor", []string{}, "apply a color translation matrix to image channels")
convertCmd.Flags().StringSliceS("red-primary", "red-primary", []string{}, "chomaticity red primary point")
convertCmd.Flags().StringSliceS("region", "region", []string{}, "apply options to a portion of the image")
convertCmd.Flags().CountS("render", "render", "render vector graphics")
convertCmd.Flags().StringSliceS("repage", "repage", []string{}, "adjust current page offsets by geometry")
convertCmd.Flags().StringSliceS("resample", "resample", []string{}, "resample to horizontal and vertical resolution")
convertCmd.Flags().StringSliceS("resize", "resize", []string{}, "resize the image")
convertCmd.Flags().StringSliceS("roll", "roll", []string{}, "roll an image vertically or horizontally")
convertCmd.Flags().StringSliceS("rotate", "rotate", []string{}, "apply Paeth rotation to the image")
convertCmd.Flags().StringSliceS("sample", "sample", []string{}, "scale image with pixel sampling")
convertCmd.Flags().StringSliceS("sampling-factor", "sampling-factor", []string{}, "horizontal and vertical sampling factors")
convertCmd.Flags().StringSliceS("scale", "scale", []string{}, "scale the image")
convertCmd.Flags().StringSliceS("scene", "scene", []string{}, "image scene number")
convertCmd.Flags().StringSliceS("seed", "seed", []string{}, "pseudo-random number generator seed value")
convertCmd.Flags().StringSliceS("segment", "segment", []string{}, "segment an image")
convertCmd.Flags().StringSliceS("set", "set", []string{}, "set image attribute")
convertCmd.Flags().StringSliceS("shade", "shade", []string{}, "shade the image using a distant light source")
convertCmd.Flags().StringSliceS("sharpen", "sharpen", []string{}, "sharpen the image")
convertCmd.Flags().StringSliceS("shave", "shave", []string{}, "shave pixels from the image edges")
convertCmd.Flags().StringSliceS("shear", "shear", []string{}, "slide one edge of the image along the X or Y axis")
convertCmd.Flags().StringSliceS("size", "size", []string{}, "width and height of image")
convertCmd.Flags().StringSliceS("solarize", "solarize", []string{}, "negate all pixels above the threshold level")
convertCmd.Flags().StringSliceS("spread", "spread", []string{}, "displace image pixels by a random amount")
convertCmd.Flags().CountS("strip", "strip", "strip all profiles and text attributes from image")
convertCmd.Flags().StringSliceS("stroke", "stroke", []string{}, "graphic primitive stroke color")
convertCmd.Flags().StringSliceS("strokewidth", "strokewidth", []string{}, "graphic primitive stroke width")
convertCmd.Flags().StringSliceS("swirl", "swirl", []string{}, "swirl image pixels about the center")
convertCmd.Flags().StringSliceS("texture", "texture", []string{}, "name of texture to tile onto the image background")
convertCmd.Flags().StringSliceS("threshold", "threshold", []string{}, "threshold the image")
convertCmd.Flags().StringSliceS("thumbnail", "thumbnail", []string{}, "resize the image (optimized for thumbnails)")
convertCmd.Flags().StringSliceS("tile", "tile", []string{}, "tile image when filling a graphic primitive")
convertCmd.Flags().CountS("transform", "transform", "affine transform image")
convertCmd.Flags().StringSliceS("transparent", "transparent", []string{}, "make this color transparent within the image")
convertCmd.Flags().StringSliceS("treedepth", "treedepth", []string{}, "color tree depth")
convertCmd.Flags().CountS("trim", "trim", "trim image edges")
convertCmd.Flags().StringSliceS("type", "type", []string{}, "image type")
convertCmd.Flags().StringSliceS("undercolor", "undercolor", []string{}, "annotation bounding box color")
convertCmd.Flags().StringSliceS("units", "units", []string{}, "PixelsPerInch, PixelsPerCentimeter, or Undefined")
convertCmd.Flags().StringSliceS("unsharp", "unsharp", []string{}, "sharpen the image")
convertCmd.Flags().BoolS("verbose", "verbose", false, "print detailed information about the image")
convertCmd.Flags().BoolS("version", "version", false, "print version information")
convertCmd.Flags().CountS("view", "view", "FlashPix viewing transforms")
convertCmd.Flags().StringSliceS("virtual-pixel", "virtual-pixel", []string{}, "Constant, Edge, Mirror, or Tile")
convertCmd.Flags().StringSliceS("wave", "wave", []string{}, "alter an image along a sine wave")
convertCmd.Flags().StringSliceS("white-point", "white-point", []string{}, "chomaticity white point")
convertCmd.Flags().StringSliceS("white-threshold", "white-threshold", []string{}, "pixels above the threshold become white")
convertCmd.Flags().StringSliceS("write", "write", []string{}, "write image to this file")
rootCmd.AddCommand(convertCmd)
carapace.Gen(convertCmd).FlagCompletion(carapace.ActionMap{
"fill": action.ActionColor(),
})
carapace.Gen(convertCmd).PositionalAnyCompletion(carapace.ActionFiles())
}

View File

@ -0,0 +1,84 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var displayCmd = &cobra.Command{
Use: "display",
Short: "display an image on a workstation running X",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(displayCmd).Standalone()
displayCmd.Flags().StringS("authenticate", "authenticate", "", "decrypt image with this password")
displayCmd.Flags().CountS("backdrop", "backdrop", "display image centered on a backdrop")
displayCmd.Flags().StringS("border", "border", "", "surround image with a border of color")
displayCmd.Flags().StringS("colormap", "colormap", "", "Shared or Private")
displayCmd.Flags().CountS("colors", "colors", "preferred number of colors in the image")
displayCmd.Flags().StringS("colorspace", "colorspace", "", "alternate image colorspace")
displayCmd.Flags().StringS("comment", "comment", "", "annotate image with comment")
displayCmd.Flags().StringS("compress", "compress", "", "image compression type")
displayCmd.Flags().CountS("contrast", "contrast", "enhance or reduce the image contrast")
displayCmd.Flags().StringS("crop", "crop", "", "preferred size and location of the cropped image")
displayCmd.Flags().StringS("debug", "debug", "", "display copious debugging information")
displayCmd.Flags().StringS("define", "define", "", "Coder/decoder specific options")
displayCmd.Flags().StringS("delay", "delay", "", "display the next image after pausing")
displayCmd.Flags().StringS("density", "density", "", "horizontal and vertical density of the image")
displayCmd.Flags().StringS("depth", "depth", "", "image depth")
displayCmd.Flags().CountS("despeckle", "despeckle", "reduce the speckles within an image")
displayCmd.Flags().StringS("display", "display", "", "display image to this X server")
displayCmd.Flags().StringS("dispose", "dispose", "", "Undefined, None, Background, Previous")
displayCmd.Flags().CountS("dither", "dither", "apply Floyd/Steinberg error diffusion to image")
displayCmd.Flags().StringS("edge", "edge", "", "apply a filter to detect edges in the image")
displayCmd.Flags().StringS("endian", "endian", "", "multibyte word order (LSB, MSB, or Native)")
displayCmd.Flags().CountS("enhance", "enhance", "apply a digital filter to enhance a noisy image")
displayCmd.Flags().StringS("filter", "filter", "", "use this filter when resizing an image")
displayCmd.Flags().CountS("flip", "flip", "flip image in the vertical direction")
displayCmd.Flags().CountS("flop", "flop", "flop image in the horizontal direction")
displayCmd.Flags().StringS("frame", "frame", "", "surround image with an ornamental border")
displayCmd.Flags().StringS("gamma", "gamma", "", "level of gamma correction")
displayCmd.Flags().StringS("geometry", "geometry", "", "preferred size and location of the Image window")
displayCmd.Flags().BoolS("help", "help", false, "print program options")
displayCmd.Flags().CountS("immutable", "immutable", "displayed image cannot be modified")
displayCmd.Flags().StringS("interlace", "interlace", "", "None, Line, Plane, or Partition")
displayCmd.Flags().StringS("label", "label", "", "assign a label to an image")
displayCmd.Flags().StringS("limit", "limit", "", "Disk, File, Map, Memory, Pixels, Width, Height or Threads resource limit")
displayCmd.Flags().StringS("log", "log", "", "format of debugging information")
displayCmd.Flags().StringS("map", "map", "", "display image using this Standard Colormap")
displayCmd.Flags().CountS("matte", "matte", "store matte channel if the image has one")
displayCmd.Flags().CountS("monitor", "monitor", "show progress indication")
displayCmd.Flags().CountS("monochrome", "monochrome", "transform image to black and white")
displayCmd.Flags().CountS("negate", "negate", "replace every pixel with its complementary color")
displayCmd.Flags().CountS("noop", "noop", "do not apply options to image")
displayCmd.Flags().StringS("page", "page", "", "size and location of an image canvas")
displayCmd.Flags().StringS("quality", "quality", "", "JPEG/MIFF/PNG compression level")
displayCmd.Flags().StringS("raise", "raise", "", "lighten/darken image edges to create a 3-D effect")
displayCmd.Flags().StringS("remote", "remote", "", "execute a command in an remote display process")
displayCmd.Flags().StringS("roll", "roll", "", "roll an image vertically or horizontally")
displayCmd.Flags().StringS("rotate", "rotate", "", "apply Paeth rotation to the image")
displayCmd.Flags().StringS("sample", "sample", "", "scale image with pixel sampling")
displayCmd.Flags().StringS("sampling-factor", "sampling-factor", "", "horizontal and vertical sampling factors")
displayCmd.Flags().StringS("scenes", "scenes", "", "image scene range")
displayCmd.Flags().StringS("segment", "segment", "", "segment an image")
displayCmd.Flags().StringS("set", "set", "", "set image attribute")
displayCmd.Flags().StringS("sharpen", "sharpen", "", "sharpen the image")
displayCmd.Flags().StringS("size", "size", "", "width and height of image")
displayCmd.Flags().StringS("texture", "texture", "", "name of texture to tile onto the image background")
displayCmd.Flags().StringS("treedepth", "treedepth", "", "color tree depth")
displayCmd.Flags().CountS("trim", "trim", "trim image edges")
displayCmd.Flags().StringS("type", "type", "", "image type")
displayCmd.Flags().StringS("update", "update", "", "detect when image file is modified and redisplay")
displayCmd.Flags().BoolS("verbose", "verbose", false, "print detailed information about the image")
displayCmd.Flags().BoolS("version", "version", false, "print version information")
displayCmd.Flags().StringS("virtual-pixel", "virtual-pixel", "", "Constant, Edge, Mirror, or Tile")
displayCmd.Flags().StringS("window", "window", "", "display image to background of this window")
displayCmd.Flags().StringS("window_group", "window_group", "", "exit program when this window id is destroyed")
displayCmd.Flags().StringS("write", "write", "", "write image to a file")
rootCmd.AddCommand(displayCmd)
carapace.Gen(displayCmd).PositionalAnyCompletion(carapace.ActionFiles())
}

View File

@ -0,0 +1,20 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var helpCmd = &cobra.Command{
Use: "help",
Short: "obtain usage message for named command",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(helpCmd).Standalone()
rootCmd.AddCommand(helpCmd)
carapace.Gen(helpCmd).PositionalCompletion(carapace.ActionCommands(rootCmd))
}

View File

@ -0,0 +1,35 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var identifyCmd = &cobra.Command{
Use: "identify",
Short: "describe an image or image sequence",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(identifyCmd).Standalone()
identifyCmd.Flags().StringSliceS("debug", "debug", []string{}, "display copious debugging information")
identifyCmd.Flags().StringSliceS("define", "define", []string{}, "Coder/decoder specific options")
identifyCmd.Flags().StringSliceS("density", "density", []string{}, "horizontal and vertical density of the image")
identifyCmd.Flags().StringSliceS("depth", "depth", []string{}, "image depth")
identifyCmd.Flags().StringSliceS("format", "format", []string{}, "output formatted image characteristics")
identifyCmd.Flags().BoolS("help", "help", false, "print program options")
identifyCmd.Flags().StringSliceS("interlace", "interlace", []string{}, "None, Line, Plane, or Partition")
identifyCmd.Flags().StringSliceS("log", "log", []string{}, "format of debugging information")
identifyCmd.Flags().CountS("monitor", "monitor", "show progress indication")
identifyCmd.Flags().CountS("ping", "ping", "efficiently determine image attributes")
identifyCmd.Flags().StringSliceS("sampling-factor", "sampling-factor", []string{}, "horizontal and vertical sampling factors")
identifyCmd.Flags().StringSliceS("size", "size", []string{}, "width and height of image")
identifyCmd.Flags().BoolS("verbose", "verbose", false, "print detailed information about the image")
identifyCmd.Flags().BoolS("version", "version", false, "print version information")
identifyCmd.Flags().StringSliceS("virtual-pixel", "virtual-pixel", []string{}, "Constant, Edge, Mirror, or Tile")
rootCmd.AddCommand(identifyCmd)
carapace.Gen(identifyCmd).PositionalAnyCompletion(carapace.ActionFiles())
}

View File

@ -0,0 +1,69 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var importCmd = &cobra.Command{
Use: "import",
Short: "capture an application or X server screen",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(importCmd).Standalone()
importCmd.Flags().CountS("adjoin", "adjoin", "join images into a single multi-image file")
importCmd.Flags().CountS("border", "border", "include image borders in the output image")
importCmd.Flags().CountS("colors", "colors", "preferred number of colors in the image")
importCmd.Flags().StringSliceS("colorspace", "colorspace", []string{}, "alternate image colorspace")
importCmd.Flags().StringSliceS("comment", "comment", []string{}, "annotate image with comment")
importCmd.Flags().StringSliceS("compress", "compress", []string{}, "image compression type")
importCmd.Flags().StringSliceS("crop", "crop", []string{}, "preferred size and location of the cropped image")
importCmd.Flags().StringSliceS("debug", "debug", []string{}, "display copious debugging information")
importCmd.Flags().StringSliceS("define", "define", []string{}, "Coder/decoder specific options")
importCmd.Flags().StringSliceS("delay", "delay", []string{}, "display the next image after pausing")
importCmd.Flags().StringSliceS("density", "density", []string{}, "horizontal and vertical density of the image")
importCmd.Flags().StringSliceS("depth", "depth", []string{}, "image depth")
importCmd.Flags().CountS("descend", "descend", "obtain image by descending window hierarchy")
importCmd.Flags().StringSliceS("display", "display", []string{}, "X server to contact")
importCmd.Flags().StringSliceS("dispose", "dispose", []string{}, "Undefined, None, Background, Previous")
importCmd.Flags().CountS("dither", "dither", "apply Floyd/Steinberg error diffusion to image")
importCmd.Flags().StringSliceS("encoding", "encoding", []string{}, "text encoding type")
importCmd.Flags().StringSliceS("endian", "endian", []string{}, "multibyte word order (LSB, MSB, or Native)")
importCmd.Flags().CountS("frame", "frame", "include window manager frame")
importCmd.Flags().StringSliceS("geometry", "geometry", []string{}, "preferred size or location of the image")
importCmd.Flags().BoolS("help", "help", false, "program options")
importCmd.Flags().StringSliceS("interlace", "interlace", []string{}, "None, Line, Plane, or Partition")
importCmd.Flags().StringSliceS("label", "label", []string{}, "assign a label to an image")
importCmd.Flags().StringSliceS("limit", "limit", []string{}, "Disk, File, Map, Memory, Pixels, Width, Height or Threads resource limit")
importCmd.Flags().StringSliceS("log", "log", []string{}, "format of debugging information")
importCmd.Flags().CountS("monitor", "monitor", "show progress indication")
importCmd.Flags().StringSliceS("monochrome", "monochrome", []string{}, "image to black and white")
importCmd.Flags().CountS("negate", "negate", "replace every pixel with its complementary color ")
importCmd.Flags().StringSliceS("page", "page", []string{}, "size and location of an image canvas")
importCmd.Flags().StringSliceS("pause", "pause", []string{}, "seconds delay between snapshots")
importCmd.Flags().StringSliceS("pointsize", "pointsize", []string{}, "font point size")
importCmd.Flags().StringSliceS("quality", "quality", []string{}, "JPEG/MIFF/PNG compression level")
importCmd.Flags().StringSliceS("resize", "resize", []string{}, "resize the image")
importCmd.Flags().StringSliceS("rotate", "rotate", []string{}, "apply Paeth rotation to the image")
importCmd.Flags().StringSliceS("sampling-factor", "sampling-factor", []string{}, "horizontal and vertical sampling factors")
importCmd.Flags().StringSliceS("scene", "scene", []string{}, "image scene number")
importCmd.Flags().CountS("screen", "screen", "select image from root window")
importCmd.Flags().StringSliceS("set", "set", []string{}, "set image attribute")
importCmd.Flags().CountS("silent", "silent", "operate silently, i.e. don't ring any bells ")
importCmd.Flags().StringSliceS("snaps", "snaps", []string{}, "number of screen snapshots")
importCmd.Flags().StringSliceS("thumbnail", "thumbnail", []string{}, "resize the image (optimized for thumbnails)")
importCmd.Flags().StringSliceS("transparent", "transparent", []string{}, "make this color transparent within the image")
importCmd.Flags().StringSliceS("treedepth", "treedepth", []string{}, "color tree depth")
importCmd.Flags().CountS("trim", "trim", "trim image edges")
importCmd.Flags().StringSliceS("type", "type", []string{}, "image type")
importCmd.Flags().BoolS("verbose", "verbose", false, "detailed information about the image")
importCmd.Flags().BoolS("version", "version", false, "version information")
importCmd.Flags().StringSliceS("virtual-pixel", "virtual-pixel", []string{}, "Constant, Edge, Mirror, or Tile")
importCmd.Flags().StringSliceS("window", "window", []string{}, "select window with this id or name")
rootCmd.AddCommand(importCmd)
carapace.Gen(importCmd).PositionalCompletion(carapace.ActionFiles())
}

View File

@ -0,0 +1,167 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/completers/gm_completer/cmd/action"
"github.com/spf13/cobra"
)
var mogrifyCmd = &cobra.Command{
Use: "mogrify",
Short: "transform an image or sequence of images",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(mogrifyCmd).Standalone()
mogrifyCmd.Flags().StringSliceS("affine", "affine", []string{}, "affine transform matrix")
mogrifyCmd.Flags().CountS("antialias", "antialias", "remove pixel-aliasing")
mogrifyCmd.Flags().StringSliceS("asc-cdl", "asc-cdl", []string{}, "apply ASC CDL transform")
mogrifyCmd.Flags().StringSliceS("authenticate", "authenticate", []string{}, "decrypt image with this password")
mogrifyCmd.Flags().CountS("auto-orient", "auto-orient", "orient (rotate) image so it is upright")
mogrifyCmd.Flags().StringSliceS("background", "background", []string{}, "background color")
mogrifyCmd.Flags().StringSliceS("black-threshold", "black-threshold", []string{}, "pixels below the threshold become black")
mogrifyCmd.Flags().StringSliceS("blue-primary", "blue-primary", []string{}, "chomaticity blue primary point")
mogrifyCmd.Flags().StringSliceS("blur", "blur", []string{}, "blur the image")
mogrifyCmd.Flags().StringSliceS("border", "border", []string{}, "surround image with a border of color")
mogrifyCmd.Flags().StringSliceS("bordercolor", "bordercolor", []string{}, "border color")
mogrifyCmd.Flags().StringSliceS("box", "box", []string{}, "set the color of the annotation bounding box")
mogrifyCmd.Flags().StringSliceS("channel", "channel", []string{}, "extract a particular color channel from image")
mogrifyCmd.Flags().StringSliceS("charcoal", "charcoal", []string{}, "simulate a charcoal drawing")
mogrifyCmd.Flags().StringSliceS("chop", "chop", []string{}, "remove pixels from the image interior")
mogrifyCmd.Flags().StringSliceS("colorize", "colorize", []string{}, "colorize the image with the fill color")
mogrifyCmd.Flags().CountS("colors", "colors", "preferred number of colors in the image")
mogrifyCmd.Flags().StringSliceS("colorspace", "colorspace", []string{}, "alternate image colorspace")
mogrifyCmd.Flags().StringSliceS("comment", "comment", []string{}, "annotate image with comment")
mogrifyCmd.Flags().StringSliceS("compose", "compose", []string{}, "composite operator")
mogrifyCmd.Flags().StringSliceS("compress", "compress", []string{}, "image compression type")
mogrifyCmd.Flags().CountS("contrast", "contrast", "enhance or reduce the image contrast")
mogrifyCmd.Flags().StringSliceS("convolve", "convolve", []string{}, "convolve image with the specified convolution kernel")
mogrifyCmd.Flags().CountS("create-directories", "create-directories", "create output directories if required")
mogrifyCmd.Flags().StringSliceS("crop", "crop", []string{}, "preferred size and location of the cropped image")
mogrifyCmd.Flags().StringSliceS("cycle", "cycle", []string{}, "cycle the image colormap")
mogrifyCmd.Flags().StringSliceS("debug", "debug", []string{}, "display copious debugging information")
mogrifyCmd.Flags().StringSliceS("define", "define", []string{}, "Coder/decoder specific options")
mogrifyCmd.Flags().StringSliceS("delay", "delay", []string{}, "display the next image after pausing")
mogrifyCmd.Flags().StringSliceS("density", "density", []string{}, "horizontal and vertical density of the image")
mogrifyCmd.Flags().StringSliceS("depth", "depth", []string{}, "image depth")
mogrifyCmd.Flags().CountS("despeckle", "despeckle", "reduce the speckles within an image")
mogrifyCmd.Flags().StringSliceS("display", "display", []string{}, "get image or font from this X server")
mogrifyCmd.Flags().StringSliceS("dispose", "dispose", []string{}, "Undefined, None, Background, Previous")
mogrifyCmd.Flags().CountS("dither", "dither", "apply Floyd/Steinberg error diffusion to image")
mogrifyCmd.Flags().StringSliceS("draw", "draw", []string{}, "annotate the image with a graphic primitive")
mogrifyCmd.Flags().StringSliceS("edge", "edge", []string{}, "apply a filter to detect edges in the image")
mogrifyCmd.Flags().StringSliceS("emboss", "emboss", []string{}, "emboss an image")
mogrifyCmd.Flags().StringSliceS("encoding", "encoding", []string{}, "text encoding type")
mogrifyCmd.Flags().StringSliceS("endian", "endian", []string{}, "multibyte word order (LSB, MSB, or Native)")
mogrifyCmd.Flags().CountS("enhance", "enhance", "apply a digital filter to enhance a noisy image")
mogrifyCmd.Flags().StringSliceS("equalize", "equalize", []string{}, "perform histogram equalization to an image")
mogrifyCmd.Flags().CountS("extent", "extent", "composite image on background color canvas image")
mogrifyCmd.Flags().StringSliceS("fill", "fill", []string{}, "color to use when filling a graphic primitive")
mogrifyCmd.Flags().StringSliceS("filter", "filter", []string{}, "use this filter when resizing an image")
mogrifyCmd.Flags().CountS("flip", "flip", "flip image in the vertical direction")
mogrifyCmd.Flags().CountS("flop", "flop", "flop image in the horizontal direction")
mogrifyCmd.Flags().StringSliceS("font", "font", []string{}, "render text with this font")
mogrifyCmd.Flags().StringSliceS("format", "format", []string{}, "image format type")
mogrifyCmd.Flags().StringSliceS("frame", "frame", []string{}, "surround image with an ornamental border")
mogrifyCmd.Flags().StringSliceS("fuzz", "fuzz", []string{}, "colors within this distance are considered equal")
mogrifyCmd.Flags().StringSliceS("gamma", "gamma", []string{}, "level of gamma correction")
mogrifyCmd.Flags().StringSliceS("gaussian", "gaussian", []string{}, "gaussian blur an image")
mogrifyCmd.Flags().StringSliceS("geometry", "geometry", []string{}, "preferred size or location of the image")
mogrifyCmd.Flags().StringSliceS("gravity", "gravity", []string{}, "horizontal and vertical text/object placement")
mogrifyCmd.Flags().StringSliceS("green-primary", "green-primary", []string{}, "chomaticity green primary point")
mogrifyCmd.Flags().StringSliceS("hald-clut", "hald-clut", []string{}, "apply a Hald CLUT to the image")
mogrifyCmd.Flags().BoolS("help", "help", false, "print program options")
mogrifyCmd.Flags().StringSliceS("implode", "implode", []string{}, "implode image pixels about the center")
mogrifyCmd.Flags().StringSliceS("interlace", "interlace", []string{}, "None, Line, Plane, or Partition")
mogrifyCmd.Flags().StringSliceS("label", "labellabel", []string{}, "assign a label to an image")
mogrifyCmd.Flags().StringSliceS("lat", "lat", []string{}, "local adaptive thresholding")
mogrifyCmd.Flags().StringSliceS("level", "level", []string{}, "adjust the level of image contrast")
mogrifyCmd.Flags().StringSliceS("limit", "limit", []string{}, "Disk, File, Map, Memory, Pixels, Width, Height or Threads resource limit")
mogrifyCmd.Flags().StringSliceS("linewidth", "linewidth", []string{}, "the line width for subsequent draw operations")
mogrifyCmd.Flags().StringSliceS("list", "list", []string{}, "Color, Delegate, Format, Magic, Module, Resource, or Type")
mogrifyCmd.Flags().StringSliceS("log", "log", []string{}, "format of debugging information")
mogrifyCmd.Flags().StringSliceS("loop", "loop", []string{}, "add Netscape loop extension to your GIF animation")
mogrifyCmd.Flags().CountS("magnify", "magnify", "interpolate image to double size")
mogrifyCmd.Flags().StringSliceS("map", "map", []string{}, "transform image colors to match this set of colors")
mogrifyCmd.Flags().StringSliceS("mask", "mask", []string{}, "set the image clip mask")
mogrifyCmd.Flags().CountS("matte", "matte", "store matte channel if the image has one")
mogrifyCmd.Flags().StringSliceS("mattecolor", "mattecolor", []string{}, "specify the color to be used with the -frame option")
mogrifyCmd.Flags().StringSliceS("median", "median", []string{}, "apply a median filter to the image")
mogrifyCmd.Flags().CountS("minify", "minify", "interpolate the image to half size")
mogrifyCmd.Flags().StringSliceS("modulate", "modulate", []string{}, "vary the brightness, saturation, and hue")
mogrifyCmd.Flags().CountS("monitor", "monitor", "show progress indication")
mogrifyCmd.Flags().CountS("monochrome", "monochrome", "transform image to black and white")
mogrifyCmd.Flags().StringSliceS("motion-blur", "motion-blur", []string{}, "simulate motion blur")
mogrifyCmd.Flags().CountS("negate", "negate", "replace every pixel with its complementary color")
mogrifyCmd.Flags().StringSliceS("noise", "noise", []string{}, "add or reduce noise in an image")
mogrifyCmd.Flags().CountS("noop", "noop", "do not apply options to image")
mogrifyCmd.Flags().CountS("normalize", "normalize", "transform image to span the full range of colors")
mogrifyCmd.Flags().StringSliceS("opaque", "opaque", []string{}, "change this color to the fill color")
mogrifyCmd.Flags().StringSliceS("operator", "operator", []string{}, "apply a mathematical or bitwise operator to channel")
mogrifyCmd.Flags().StringSliceS("ordered-dither", "ordered-dither", []string{}, "ordered dither the image")
mogrifyCmd.Flags().StringSliceS("orient", "orient", []string{}, "set image orientation attribute")
mogrifyCmd.Flags().StringSliceS("output-directory", "output-directory", []string{}, "write output files to directory")
mogrifyCmd.Flags().StringSliceS("page", "page", []string{}, "size and location of an image canvas")
mogrifyCmd.Flags().StringSliceS("paint", "paint", []string{}, "simulate an oil painting")
mogrifyCmd.Flags().StringSliceS("pointsize", "pointsize", []string{}, "font point size")
mogrifyCmd.Flags().CountS("preserve-timestamp", "preserve-timestamp", "preserve original timestamps of the file")
mogrifyCmd.Flags().StringSliceS("profile", "profile", []string{}, "add ICM or IPTC information profile to image")
mogrifyCmd.Flags().StringSliceS("quality", "quality", []string{}, "JPEG/MIFF/PNG compression level")
mogrifyCmd.Flags().StringSliceS("raise", "raise", []string{}, "lighten/darken image edges to create a 3-D effect")
mogrifyCmd.Flags().StringSliceS("random-threshold", "random-threshold", []string{}, "random threshold the image")
mogrifyCmd.Flags().StringSliceS("recolor", "recolor", []string{}, "apply a color translation matrix to image channels")
mogrifyCmd.Flags().StringSliceS("red-primary", "red-primary", []string{}, "chomaticity red primary point")
mogrifyCmd.Flags().StringSliceS("region", "region", []string{}, "apply options to a portion of the image")
mogrifyCmd.Flags().CountS("render", "render", "render vector graphics")
mogrifyCmd.Flags().StringSliceS("repage", "repage", []string{}, "adjust current page offsets by geometry")
mogrifyCmd.Flags().StringSliceS("resample", "resample", []string{}, "resample to horizontal and vertical resolution")
mogrifyCmd.Flags().StringSliceS("resize", "resize", []string{}, "preferred size or location of the image")
mogrifyCmd.Flags().StringSliceS("roll", "roll", []string{}, "roll an image vertically or horizontally")
mogrifyCmd.Flags().StringSliceS("rotate", "rotate", []string{}, "apply Paeth rotation to the image")
mogrifyCmd.Flags().StringSliceS("sample", "sample", []string{}, "scale image with pixel sampling")
mogrifyCmd.Flags().StringSliceS("sampling-factor", "sampling-factor", []string{}, "horizontal and vertical sampling factors")
mogrifyCmd.Flags().StringSliceS("scale", "scale", []string{}, "scale the image")
mogrifyCmd.Flags().StringSliceS("scene", "scene", []string{}, "image scene number")
mogrifyCmd.Flags().StringSliceS("seed", "seed", []string{}, "pseudo-random number generator seed value")
mogrifyCmd.Flags().StringSliceS("segment", "segment", []string{}, "segment an image")
mogrifyCmd.Flags().StringSliceS("set", "set", []string{}, "set image attribute")
mogrifyCmd.Flags().StringSliceS("shade", "shade", []string{}, "shade the image using a distant light source")
mogrifyCmd.Flags().StringSliceS("sharpen", "sharpen", []string{}, "sharpen the image")
mogrifyCmd.Flags().StringSliceS("shave", "shave", []string{}, "shave pixels from the image edges")
mogrifyCmd.Flags().StringSliceS("shear", "shear", []string{}, "slide one edge of the image along the X or Y axis")
mogrifyCmd.Flags().StringSliceS("size", "size", []string{}, "width and height of image")
mogrifyCmd.Flags().StringSliceS("solarize", "solarizesolarize", []string{}, "negate all pixels above the threshold level")
mogrifyCmd.Flags().StringSliceS("spread", "spreadspread", []string{}, "displace image pixels by a random amount")
mogrifyCmd.Flags().CountS("strip", "stripstrip", "strip all profiles and text attributes from image")
mogrifyCmd.Flags().StringSliceS("stroke", "strokestroke", []string{}, "graphic primitive stroke color")
mogrifyCmd.Flags().StringSliceS("strokewidth", "strokewidthstrokewidth", []string{}, "graphic primitive stroke width")
mogrifyCmd.Flags().StringSliceS("swirl", "swirl", []string{}, "swirl image pixels about the center")
mogrifyCmd.Flags().StringSliceS("texture", "texture", []string{}, "name of texture to tile onto the image background")
mogrifyCmd.Flags().StringSliceS("threshold", "threshold", []string{}, "threshold the image")
mogrifyCmd.Flags().StringSliceS("thumbnail", "thumbnail", []string{}, "resize the image (optimized for thumbnails)")
mogrifyCmd.Flags().StringSliceS("tile", "tile", []string{}, "tile image when filling a graphic primitive")
mogrifyCmd.Flags().CountS("transform", "transform", "affine transform image")
mogrifyCmd.Flags().StringSliceS("transparent", "transparent", []string{}, "make this color transparent within the image")
mogrifyCmd.Flags().StringSliceS("treedepth", "treedepth", []string{}, "color tree depth")
mogrifyCmd.Flags().CountS("trim", "trim", "trim image edges")
mogrifyCmd.Flags().StringSliceS("type", "type", []string{}, "image type")
mogrifyCmd.Flags().StringSliceS("undercolor", "undercolor", []string{}, "annotation bounding box color")
mogrifyCmd.Flags().StringSliceS("units", "units", []string{}, "PixelsPerInch, PixelsPerCentimeter, or Undefined")
mogrifyCmd.Flags().StringSliceS("unsharp", "unsharp", []string{}, "sharpen the image")
mogrifyCmd.Flags().BoolS("verbose", "verbose", false, "print detailed information about the image")
mogrifyCmd.Flags().BoolS("version", "version", false, "print version information")
mogrifyCmd.Flags().CountS("view", "view", "FlashPix viewing transforms")
mogrifyCmd.Flags().StringSliceS("virtual-pixel", "virtual-pixel", []string{}, "Constant, Edge, Mirror, or Tile")
mogrifyCmd.Flags().StringSliceS("wave", "wave", []string{}, "alter an image along a sine wave")
mogrifyCmd.Flags().StringSliceS("white-point", "white-point", []string{}, "chomaticity white point")
mogrifyCmd.Flags().StringSliceS("white-threshold", "white-threshold", []string{}, "pixels above the threshold become white")
rootCmd.AddCommand(mogrifyCmd)
carapace.Gen(mogrifyCmd).FlagCompletion(carapace.ActionMap{
"fill": action.ActionColor(),
})
carapace.Gen(mogrifyCmd).PositionalAnyCompletion(carapace.ActionFiles())
}

View File

@ -0,0 +1,100 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/completers/gm_completer/cmd/action"
"github.com/spf13/cobra"
)
var montageCmd = &cobra.Command{
Use: "montage",
Short: "create a composite image (in a grid) from separate images",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(montageCmd).Standalone()
montageCmd.Flags().CountS("adjoin", "adjoin", "join images into a single multi-image file")
montageCmd.Flags().StringSliceS("affine", "affine", []string{}, "affine transform matrix")
montageCmd.Flags().StringSliceS("authenticate", "authenticate", []string{}, "decrypt image with this password")
montageCmd.Flags().StringSliceS("background", "background", []string{}, "background color")
montageCmd.Flags().StringSliceS("blue-primary", "blue-primary", []string{}, "chomaticity blue primary point")
montageCmd.Flags().StringSliceS("blur", "blur", []string{}, "apply a filter to blur the image")
montageCmd.Flags().StringSliceS("bordercolor", "bordercolor", []string{}, "border color")
montageCmd.Flags().StringSliceS("borderwidth", "borderwidth", []string{}, "border width")
montageCmd.Flags().CountS("colors", "colors", "preferred number of colors in the image")
montageCmd.Flags().StringSliceS("colorspace", "colorspace", []string{}, "alternate image colorsapce")
montageCmd.Flags().StringSliceS("comment", "comment", []string{}, "annotate image with comment")
montageCmd.Flags().StringSliceS("compose", "compose", []string{}, "composite operator")
montageCmd.Flags().StringSliceS("compress", "compress", []string{}, "image compression type")
montageCmd.Flags().StringSliceS("crop", "crop", []string{}, "preferred size and location of the cropped image")
montageCmd.Flags().StringSliceS("debug", "debug", []string{}, "display copious debugging information")
montageCmd.Flags().StringSliceS("define", "define", []string{}, "Coder/decoder specific options")
montageCmd.Flags().StringSliceS("density", "density", []string{}, "horizontal and vertical density of the image")
montageCmd.Flags().StringSliceS("depth", "depth", []string{}, "image depth")
montageCmd.Flags().StringSliceS("display", "display", []string{}, "query font from this X server")
montageCmd.Flags().StringSliceS("dispose", "dispose", []string{}, "Undefined, None, Background, Previous")
montageCmd.Flags().CountS("dither", "dither", "apply Floyd/Steinberg error diffusion to image")
montageCmd.Flags().StringSliceS("draw", "draw", []string{}, "annotate the image with a graphic primitive")
montageCmd.Flags().StringSliceS("encoding", "encoding", []string{}, "text encoding type")
montageCmd.Flags().StringSliceS("endian", "endian", []string{}, "multibyte word order (LSB, MSB, or Native)")
montageCmd.Flags().StringSliceS("fill", "fill", []string{}, "color to use when filling a graphic primitive")
montageCmd.Flags().StringSliceS("filter", "filter", []string{}, "use this filter when resizing an image")
montageCmd.Flags().CountS("flip", "flip", "flip image in the vertical direction")
montageCmd.Flags().CountS("flop", "flop", "flop image in the horizontal direction")
montageCmd.Flags().StringSliceS("font", "font", []string{}, "font to use when annotating with text")
montageCmd.Flags().StringSliceS("format", "format", []string{}, "output formatted image characteristics")
montageCmd.Flags().StringSliceS("frame", "frame", []string{}, "surround image with an ornamental border")
montageCmd.Flags().StringSliceS("gamma", "gamma", []string{}, "level of gamma correction")
montageCmd.Flags().StringSliceS("geometry", "geometry", []string{}, "preferred tile and border sizes")
montageCmd.Flags().StringSliceS("gravity", "gravity", []string{}, "which direction to gravitate towards")
montageCmd.Flags().StringSliceS("green-primary", "green-primary", []string{}, "chomaticity green primary point")
montageCmd.Flags().CountS("help", "help", "print program options")
montageCmd.Flags().StringSliceS("interlace", "interlace", []string{}, "None, Line, Plane, or Partition")
montageCmd.Flags().StringSliceS("label", "label", []string{}, "assign a label to an image")
montageCmd.Flags().StringSliceS("limit", "limit", []string{}, "Disk, File, Map, Memory, Pixels, Width, Height or Threads resource limit")
montageCmd.Flags().StringSliceS("log", "log", []string{}, "format of debugging information")
montageCmd.Flags().CountS("matte", "matte", "store matte channel if the image has one")
montageCmd.Flags().StringSliceS("mattecolor", "mattecolor", []string{}, "color to be used with the -frame option")
montageCmd.Flags().StringSliceS("mode", "mode", []string{}, "Frame, Unframe, or Concatenate")
montageCmd.Flags().CountS("monitor", "monitor", "show progress indication")
montageCmd.Flags().CountS("monochrome", "monochrome", "transform image to black and white")
montageCmd.Flags().CountS("noop", "noop", "do not apply options to image")
montageCmd.Flags().StringSliceS("page", "page", []string{}, "size and location of an image canvas")
montageCmd.Flags().StringSliceS("pointsize", "pointsize", []string{}, "font point size")
montageCmd.Flags().StringSliceS("quality", "quality", []string{}, "JPEG/MIFF/PNG compression level")
montageCmd.Flags().StringSliceS("red-primary", "red-primary", []string{}, "chomaticity red primary point")
montageCmd.Flags().StringSliceS("repage", "repage", []string{}, "adjust current page offsets by geometry")
montageCmd.Flags().StringSliceS("resize", "resize", []string{}, "resize the image")
montageCmd.Flags().StringSliceS("rotate", "rotate", []string{}, "apply Paeth rotation to the image")
montageCmd.Flags().StringSliceS("sampling-factor", "sampling-factor", []string{}, "horizontal and vertical sampling factors")
montageCmd.Flags().StringSliceS("scenes", "scenes", []string{}, "image scene range")
montageCmd.Flags().StringSliceS("set", "set", []string{}, "set image attribute")
montageCmd.Flags().CountS("shadow", "shadow", "add a shadow beneath a tile to simulate depth")
montageCmd.Flags().StringSliceS("sharpen", "sharpen", []string{}, "sharpen the image")
montageCmd.Flags().StringSliceS("size", "size", []string{}, "width and height of image")
montageCmd.Flags().CountS("strip", "strip", "strip all profiles and text attributes from image")
montageCmd.Flags().StringSliceS("stroke", "stroke", []string{}, "color to use when stroking a graphic primitive")
montageCmd.Flags().StringSliceS("strokewidth", "strokewidth", []string{}, "stroke (line) width")
montageCmd.Flags().StringSliceS("texture", "texture", []string{}, "name of texture to tile onto the image background")
montageCmd.Flags().StringSliceS("thumbnail", "thumbnail", []string{}, "resize the image (optimized for thumbnails)")
montageCmd.Flags().StringSliceS("tile", "tile", []string{}, "number of tiles per row and column")
montageCmd.Flags().StringSliceS("title", "title", []string{}, "thumbnail title")
montageCmd.Flags().CountS("transform", "transform", "affine transform image")
montageCmd.Flags().StringSliceS("transparent", "transparent", []string{}, "make this color transparent within the image")
montageCmd.Flags().StringSliceS("treedepth", "treedepth", []string{}, "color tree depth")
montageCmd.Flags().CountS("trim", "trim", "trim image edges")
montageCmd.Flags().StringSliceS("type", "type", []string{}, "image type")
montageCmd.Flags().BoolS("verbose", "verbose", false, "print detailed information about the image")
montageCmd.Flags().BoolS("version", "version", false, "print version information")
montageCmd.Flags().StringSliceS("virtual-pixel", "virtual-pixel", []string{}, "Constant, Edge, Mirror, or Tile")
montageCmd.Flags().StringSliceS("white-point", "white-point", []string{}, "chomaticity white point")
rootCmd.AddCommand(montageCmd)
carapace.Gen(montageCmd).FlagCompletion(carapace.ActionMap{
"fill": action.ActionColor(),
})
carapace.Gen(montageCmd).PositionalAnyCompletion(carapace.ActionFiles())
}

View File

@ -0,0 +1,24 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var rootCmd = &cobra.Command{
Use: "gm",
Short: "command-line utility to create, edit, compare, convert, or display images",
Long: "http://www.GraphicsMagick.org/",
Run: func(cmd *cobra.Command, args []string) {},
}
func Execute() error {
return rootCmd.Execute()
}
func init() {
carapace.Gen(rootCmd).Standalone()
rootCmd.Flags().BoolS("help", "help", false, "program options")
rootCmd.Flags().BoolS("version", "version", false, "print version information")
}

View File

@ -0,0 +1,24 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bridge/pkg/actions/bridge"
"github.com/spf13/cobra"
)
var timeCmd = &cobra.Command{
Use: "time",
Short: "time one of the other commands",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(timeCmd).Standalone()
timeCmd.Flags().SetInterspersed(false)
rootCmd.AddCommand(timeCmd)
carapace.Gen(timeCmd).PositionalAnyCompletion(
bridge.ActionCarapaceBin("gm"),
)
}

View File

@ -0,0 +1,20 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var versionCmd = &cobra.Command{
Use: "version",
Short: "obtain release version",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(versionCmd).Standalone()
rootCmd.AddCommand(versionCmd)
carapace.Gen(versionCmd).PositionalCompletion(carapace.ActionCommands(rootCmd))
}

View File

@ -0,0 +1,7 @@
package main
import "github.com/carapace-sh/carapace-bin/completers/gm_completer/cmd"
func main() {
cmd.Execute()
}