编程

expiry-tracker

试用

Track food expiry dates from grocery receipts. Get daily alerts before food goes bad, 'use this today' suggestions, and reduce food waste. Scan receipts or add items manually.

它能做什么

Track food expiry dates from grocery receipts. Get daily alerts before food goes bad, 'use this today' suggestions, and reduce food waste. Scan receipts or add items manually.

技能文档

Expiry Tracker

Overview

Food waste is a massive problem — the average household throws away 30% of the food they buy. Most of it spoils simply because people forget what's in the fridge and when it expires.

Expiry Tracker solves this by maintaining a simple inventory of perishable items with their expiry dates, then proactively suggesting what to cook before things go bad.

When to Use

  • After grocery shopping — add items to track
  • Daily check — "what expires soon?"
  • Before cooking — "what should I use today?"
  • When planning meals for the week
  • Before traveling — check what needs to be consumed first

Don't use for: Non-perishables (pasta, rice, canned goods with 1+ year shelf life), frozen items (unless thawing).

Commands

# Add an item
python scripts/expiry_tracker.py add "milk" --days 7
python scripts/expiry_tracker.py add "chicken breast" --expiry 2026-08-15

# List items expiring soon
python scripts/expiry_tracker.py list --days 3

# Get today's "use this first" suggestions
python scripts/expiry_tracker.py today

# Remove consumed/expired item
python scripts/expiry_tracker.py remove "milk"

# Show full inventory sorted by expiry
python scripts/expiry_tracker.py inventory

# Weekly summary / waste report
python scripts/expiry_tracker.py report

# Bulk add from receipt text
python scripts/expiry_tracker.py batch "milk, eggs, bread, chicken, yogurt"

How It Works

  1. Items are stored in ~/.expiry_tracker.json — a simple JSON database
  2. Each item has: name, category, purchase date, expiry date, quantity, optional note
  3. Default shelf life is inferred from category (dairy=7d, meat=3d, bread=5d, etc.)
  4. today command shows items expiring within 48h, sorted by urgency
  5. report shows waste statistics: how much expired vs consumed

Default Shelf Life by Category

CategoryDaysExamples
Dairy7Milk, yogurt, cheese
Meat3Chicken, beef, pork, fish
Produce-Leafy4Spinach, lettuce, herbs
Produce-Root14Carrots, potatoes, onions
Produce-Fruit7Berries, bananas, apples
Bakery5Bread, pastries, tortillas
Deli5Cold cuts, prepared salads
Eggs21Eggs
Condiments180Opened sauces, dressings
Tofu7Tofu, tempeh

Common Pitfalls

  1. Forgetting to remove consumed items. Always run remove when you eat something, otherwise the waste report is inaccurate.

  2. Overly optimistic expiry dates. "Best before" ≠ "goes bad on." Use smell/visual check before tossing. The tracker errs on the side of caution.

  3. Not adding items on shopping day. The tracker is only as good as its data. Make it a habit to batch-add after unpacking groceries.

  4. Ignoring the today command. Set up a daily cron/reminder to check it every morning.

Verification Checklist

  • Database file created at ~/.expiry_tracker.json
  • add command works with both --days and --expiry flags
  • list --days 3 shows only items expiring within 3 days
  • today shows actionable suggestions
  • report shows waste statistics
  • batch mode parses comma-separated items correctly

相关技能

Extracts structured data from receipt text (OCR/photo description) and generates monthly spending reports. Parses merchant, date, line items, tax, total, and category. Produces summary stats: top merchants, category breakdown, total spend.

Track deductible expenses year-round with smart categorization, receipt logging, and tax-ready export. Organizes by IRS schedule categories, estimates tax savings per deduction, flags audit risks, and generates Schedule C / Schedule A ready reports. Never scramble at tax time again.

Create a privacy-first digital life inventory and cleanup plan from user-supplied information only. This skill does not scan devices, cloud accounts, passwor...

12 次安装

Suggests recipes based on leftover ingredients you already have. Takes a list of ingredients (from photo description, text, or voice) and generates recipes ranked by how completely they use what's available. Includes a 50+ recipe database and a Python matcher that flags missing ingredients.

拍照、文字或拍营养标签都能记录一餐,输出区间形式的热量与宏量营养素估算,并带安全护栏。

作者 Iván53 次安装3 星标

Log and track daily calorie intake, macronutrients, body weight, and waist measurements locally in a SQLite database. Provides granular statistics, weekly averages, and future calorie budgets.

5 次安装