
Meal Prep Grocery List Sorter by Store Section Sheets
2 tools in one download.
Meal Prep Grocery List Sorter by Store Section, Grocery List Organizer.
$18.00 USD, one-time
Buying this pack gets you a licence to use it, not ownership of the files.
- Download right after payment, and by email.
- Runs on your own computer.
- Refund within 14 days, for any reason.
- Payment is handled by Stripe.
Terms of Sale · Buyer Licence · Refund Policy · Privacy Policy
What it does
- Meal Prep Grocery List Sorter by Store Section: Reads a yaml meal plan and a yaml store map. Outputs a txt list sorted by section, with quantities summed.
- Grocery List Organizer: Provides a JSON structure that maps food items to store sections. This allows the user to sort any list by aisle.
What's inside
- Grocery List Organizer: category-list.json, sort-logic.js, store-mapping.json.
- Meal prep grocery list sorter: readme.md, sample-meals.yaml, sample-store.yaml, sorter.py, test.yaml and 1 Python file.
With a README and the Teranite Facet Buyer Licence.
Sample
Meal Prep Grocery List Sorter by Store Section
Reads a yaml meal plan and a yaml store map. Outputs a txt list sorted by section, with quantities summed.
Files: readme.md, sample-meals.yaml, sample-store.yaml, sorter.py, test.yaml. sorter.py, start of the file:
import yaml
import sys
from collections import defaultdict
def load_yaml(file_path):
try:
with open(file_path, 'r') as f:
return yaml.safe_load(f)
except Exception as e:
print(f"Error loading {file_path}: {e}")
sys.exit(1)
def main():
meals_file = 'sample-meals.yaml'
store_file = 'sample-store.yaml'
output_file = 'shopping_list.txt'
meals_data = load_yaml(meals_file)
store_data = load_yaml(store_file)
# Map item to section
item_to_section = {}
for section, items in store_data.get('sections', {}).items():
for item in items:
item_to_section[item.lower()] = section
# Aggregate ingredients
totals = defaultdict(float)
for meal in meals_data.get('meals', []):
for ing in meal.get('ingredients', []):
name = ing['item'].lower()
qty = ing['quantity']
totals[name] += qty
# Sort by section
sorted_list = defaultdict(list)
for item, qty in totals.items():
section = item_to_section.get(item, 'Other/Misc')
sorted_list[section].append(f"{qty} x {item}")
# Write to file
with open(output_file, 'w') as f:
Grocery List Organizer
Provides a JSON structure that maps food items to store sections. This allows the user to sort any list by aisle.
Files: category-list.json, sort-logic.js, store-mapping.json. sort-logic.js, start of the file:
/**
* Grocery List Organizer Logic
* Maps a flat list of food items to store sections based on a mapping file.
*/
class GrocerySorter {
constructor(mappingData, categoryData) {
this.mapping = mappingData;
this.categories = categoryData.categories;
}
sortList(clientList) {
const sortedMap = {};
const unmappedItems = [];
// Initialize sorted map with category names
Object.keys(this.mapping).forEach(section => {
sortedMap[section] = [];
});
sortedMap['Other'] = [];
clientList.forEach(item => {
let found = false;
for (const [section, items] of Object.entries(this.mapping)) {
if (items.some(mappedItem => mappedItem.toLowerCase() === item.toLowerCase())) {
sortedMap[section].push(item);
found = true;
break;
}
}
if (!found) {
sortedMap['Other'].push(item);
}
});
// Sort the sections based on the priority defined in category-list.json
const finalOrder = [];
const sortedSections = this.categoRequirements
- A program that opens the file types listed.
- Checked: every file opens and parses, and any spreadsheet formulas compute in Microsoft Excel for Windows.
- Not opened in other programs.
Install
Unzip the download, then the zip inside it. Each folder inside holds one set of files; open or import them in your own programs and work on a copy.
Licence
One licence covers one person. Your finished work is yours. Do not share or resell the files.
How it is made
Facet Packs are made with Teranite's own software tools, some of them written with help from AI, and rendered or built by standard software. They contain no AI-generated images.
Support
Questions, or a fault: support
More from Tools
See allToolAudio Normalizer for Voice-OversOutputs processed WAV files with minimal clipping.$18.00View
ToolBilingual Form HTML GeneratorThe package includes example form definitions for school, medical, and government use.$10.00View
ToolBird Ringing Schedule for UK RingersUpdates automatically from a CSV of past ringing sessions.$10.00View
Tool packCascade Deadline Shifter SheetsDeadline Chain Shifter, Cascade Deadline Shifter.$18.00View