recipe

package
v0.0.0-...-28b18ec Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2017 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ValidCategoriesOrder = []string{
	"serves",
	"oven temperature",
	"ingredients",
	"preparation",
	"tips",
}

ValidCategoriesOrder defines keys of info in order of importance

Functions

This section is empty.

Types

type Recipe

type Recipe struct {
	Title string              `json:"title"`
	Info  map[string][]string `json:"info"`
	// FIXME support non-docx
	DocxPath  string   `json:"docx_path"`
	ScanPaths []string `json:"scan_paths"`
	Image     []byte
}

Recipe stores information regarding a specific recipe

func RecipesFromPath

func RecipesFromPath(dirPath string) (recipes []*Recipe, err error)

RecipesFromPath generates Recipe instances from a path

func (*Recipe) ParseFiles

func (r *Recipe) ParseFiles() error

ParseFiles for the recipe

func (*Recipe) Summary

func (r *Recipe) Summary() (output string)

Summary outputs a nice summary of Info

Jump to

Keyboard shortcuts

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