Exemplo n.º 1
0
func RunFieldProcessor(c *cmd.Context) {
	fp := &FieldsProcessor{
		CliConf: cli.NewCliConf(c),
		Env:     process.NewEnv(),
	}

	fp.Load()
}
Exemplo n.º 2
0
func RunPlainProcessor(c *cmd.Context) {
	p := &PlainProcessor{
		CliConf: cli.NewCliConf(c),
		Env:     process.NewEnv(),
	}
	err := p.Validate()
	if err != nil {
		log.Fatal(err)
	}
	p.Run()
}
// Cli provides the context (flags and values) with which to run a process for
// generating over a front matter file.
func NewFrontMatterProcessor(c *cmd.Context) {
	p := &FrontMatterProcess{
		CliConf:  cli.NewCliConf(c),
		portions: &Portions{},
		Env:      process.NewEnv(),
	}

	err := p.Validate()
	if err != nil {
		log.Fatal(err)
	}
	p.Run()
}