command

package
v0.0.0-...-5cad063 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalyzeCommand

type AnalyzeCommand struct {
	Num bool `short:"c" long:"count" description:"Only analyze object counts"`
}

func (AnalyzeCommand) GetConfiguration

func (a AnalyzeCommand) GetConfiguration() (tc config.TransformConfig, err error)

type CommandError

type CommandError struct {
	Msg string
}

func (CommandError) Error

func (ce CommandError) Error() string

type DirectCommand

type DirectCommand struct {
	Simplify    unit.Length   `` /* 143-byte string literal not displayed */
	MinPoints   int           `long:"min-points" description:"Remove segments that have less points than the provided number." default:"0"`
	MinRadius   unit.Length   `` /* 132-byte string literal not displayed */
	MinDistance unit.Length   `long:"min-distance" description:"Remove segments that are shorter than the provided min distance." default:"0"`
	MinDuration time.Duration `long:"min-duration" description:"Remove segments that are shorter than the provided min duration." default:"0"`
	MaxDuration time.Duration `long:"max-duration" description:"Remove segments that are longer than the provided min duration." default:"0"`
	RemoveStops bool          `long:"remove-stops" description:"Remove points that are considered to have no movement."`
}

func (DirectCommand) GetConfiguration

func (d DirectCommand) GetConfiguration() (tc config.TransformConfig, err error)

type FilterCommand

type FilterCommand struct {
	Trim      unit.Length `` /* 207-byte string literal not displayed */
	TrimLeft  unit.Length `` /* 127-byte string literal not displayed */
	TrimRight unit.Length `` /* 126-byte string literal not displayed */
}

func (FilterCommand) GetConfiguration

func (f FilterCommand) GetConfiguration() (tc config.TransformConfig, err error)

type Flags

type Flags struct {
	In      string         `short:"i" long:"in" description:"The file or folder that new GPX data is read from. Leave empty to read from STDIN"`
	Out     string         `short:"o" long:"out" description:"The file or folder that new GPX data is written to. Leave empty to write to STDOUT"`
	Verbose []bool         `short:"v" long:"verbosity" description:"Verbosity with that information is printed to STDOUT"`
	Split   SplitCommand   `command:"split" description:"Splits GPX segments into multiple segments or files"`
	Merge   MergeCommand   `command:"merge" description:"Merges multiple GPX segments and tracks into single entities"`
	Filter  FilterCommand  `command:"filter" description:"Applies filters on GPX points"`
	Direct  DirectCommand  `command:"direct" description:"Applies misc. functionality directly on GPX segments"`
	Analyze AnalyzeCommand `command:"analyze" description:"Prints information for the provided GPX data"`
}

Flag holds all arguments passed via command line

func (Flags) GetConfiguration

func (flagOpts Flags) GetConfiguration(name string) (tc config.TransformConfig, err error)

GetConfiguration returns the configuration for the sub-command specified with name. Valid command names are split, filter, direct, and analyze.

func (Flags) Init

func (flagOpts Flags) Init() (err error)

Init performs initialization, including setting a global slog-level

type MergeCommand

type MergeCommand struct {
	MergeSegments bool `short:"s" long:"merge-segments" description:"Merge multiple segments from a track to a single segment."`
	MergeTracks   bool `short:"t" long:"merge-tracks" description:"Merge multiple tracks to a single track."`
	MergeFiles    bool `short:"f" long:"merge-files" description:"Merge multiple files to a single files."`
}

func (MergeCommand) GetConfiguration

func (m MergeCommand) GetConfiguration() (tc config.TransformConfig, err error)

type SplitCommand

type SplitCommand struct {
	InPlace    bool          `` /* 186-byte string literal not displayed */
	Distance   unit.Length   `` /* 176-byte string literal not displayed */
	Time       time.Duration `` /* 247-byte string literal not displayed */
	PauseSplit string        `` /* 377-byte string literal not displayed */
}

func (SplitCommand) GetConfiguration

func (s SplitCommand) GetConfiguration() (tc config.TransformConfig, err error)

type TransformCommand

type TransformCommand interface {
	GetConfiguration() (config.TransformConfig, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL