Versions in this module Expand all Collapse all v2 v2.1.3 Nov 20, 2022 v2.1.2 Nov 20, 2022 Changes in this version + var UseTor bool + func Asset(name string) ([]byte, error) + func AssetDir(name string) ([]string, error) + func AssetInfo(name string) (os.FileInfo, error) + func AssetNames() []string + func CreateClusters(folder string, numClusters int, requiredIngredients []string) (err error) + func DetermineIngredients(line string) (ingredients []string) + func DownloadAll(folder string, urls []string) (err error) + func DownloadOne(folder, url string) (fname string, err error) + func GetAllRecipes(folder string) (err error) + func GetDirections(recipe string, include []string, exclude []string) (directions []string, err error) + func GetIngredientFrequencies(meanRecipes []Recipe) (commonIngredients []string, rareIngredients []string) + func GetIngredientLines(fname string) (ingredientLines []string, err error) + func HasRecipe(recipe string) (yes bool) + func IsIngredient(s string) (yes bool) + func ListGzFiles(folder string) (files []string, err error) + func ListJSONFiles(folder string) (files []string, err error) + func MustAsset(name string) []byte + func ReadGzFile(filename string) ([]byte, error) + func RestoreAsset(dir, name string) error + func RestoreAssets(dir, name string) error + func SetLogLevel(level string) (err error) + func Singularlize(line string) string + type Cluster struct + ID int + Ingredient map[string]Collection + IngredientRelations map[string]Collection + NumRecipes int + Recipes []Recipe + type Collection struct + All []float64 + Average float64 + Number int + SD float64 + func ProcessCollection(c Collection) Collection + type Ingredient struct + Amount float64 + Cups float64 + FrequencyInCluster float64 + Ingredient string + Measure string + OriginalLine string + SD float64 + func ParseIngredients(fname string) (ingredients []Ingredient, err error) + func (p Ingredient) String() string + type Rational struct + func ParseDecimal(s string) (r Rational, err error) + func (r Rational) String() string + type Recipe struct + Directions []string + Filename string + HasRareIngredients []string + Ingredients []Ingredient + MissingCommonIngredients []string + NumberInCluster int + PercentOfAll int + Title string + TotalRecipes int + URL string + URLs []string + VolumeRelations map[string]float64 + func AnalyzeClusters(folder string) (meanRecipes []Recipe, err error) + func GenerateRecipe(fname string) (r Recipe, err error) + func Run(recipe string, clusters int, requiredIngredients []string, ...) (meanRecipes []Recipe, err error) + func (p Recipe) HasIngredient(ingredient string) bool + func (p Recipe) IngredientText() string + func (p Recipe) String() string Other modules containing this package github.com/schollz/meanrecipe