pipeline

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cli.Command{
	Name:  "pipeline",
	Usage: "Process a .yml file and dynamic generate multimedia assets",
	Action: func(ctx *cli.Context) error {
		source := ctx.Args().First()

		if source == "" {
			return ErrorMissingSourceArgument
		}

		if !path.IsAbs(source) {
			pwd, _ := os.Getwd()
			source = path.Join(pwd, source)
		}

		content, err := os.ReadFile(source)
		if err != nil {
			return err
		}

		collection, err := pipeline.Parse(content)
		if err != nil {
			return err
		}

		cfg := config.Ctx(ctx.Context)

		_, err = collection.Run(ctx.Context, *cfg)

		return err
	},
}
View Source
var ErrorMissingSourceArgument = errors.Business("Missing 'source' param", "DP:001")

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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