Versions in this module Expand all Collapse all v1 v1.2.0 Sep 13, 2020 Changes in this version + func AmountToString(amount float64) string + func ConvertStringToNumber(s string) float64 + func SanitizeLine(s string) string + type Ingredient struct + Comment string + Line string + Measure Measure + Name string + func IngredientsFromURL(url string) (ingredients []Ingredient, err error) + type IngredientList struct + Ingredients []Ingredient + func ParseTextIngredients(text string) (ingredientList IngredientList, err error) + func (il IngredientList) String() string + type LineInfo struct + AmountInString []WordPosition + Ingredient Ingredient + IngredientsInString []WordPosition + Line string + LineOriginal string + MeasureInString []WordPosition + type Measure struct + Amount float64 + Cups float64 + Name string + Weight float64 + type Recipe struct + FileContent string + FileName string + Ingredients []Ingredient + Lines []LineInfo + func Load(fname string) (r *Recipe, err error) + func NewFromFile(fname string) (r *Recipe, err error) + func NewFromHTML(name, htmlstring string) (r *Recipe, err error) + func NewFromString(htmlString string) (r *Recipe, err error) + func NewFromURL(url string) (r *Recipe, err error) + func (r *Recipe) ConvertIngredients() (err error) + func (r *Recipe) IngredientList() (ingredientList IngredientList) + func (r *Recipe) Save(fname string) (err error) + type WordPosition struct + Position int + Word string + func GetIngredientsInString(s string) (wordPositions []WordPosition) + func GetMeasuresInString(s string) (wordPositions []WordPosition) + func GetNumbersInString(s string) (wordPositions []WordPosition)