← 返回
内容创作 中文

Calorie Visualizer

Local calorie logging and visual reporting (auto-refreshes and returns report image after each log)
本地热量记录与可视化报告(每次记录后自动刷新并返回报告图片)
vintlin
内容创作 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 2
Stars
📥 1,030
下载
💾 24
安装
1
版本
#latest

概述

Calorie Visualizer

A local skill for meal logging and visual nutrition analysis.

Core Flow

  1. User sends meal text/photo (upstream extracts calorie/protein values or calls food-db lookup).
  2. add (or add-food) writes to calorie_data.db.
  3. After write, visual_renderer.py generates a fresh report image.
  4. CLI prints REPORT_IMAGE: so the chat layer can send the image.

Daily Goal Priority

  1. config.daily_goal (manual override)
  2. TDEE derived from USER.md
  3. If user explicitly refuses profile data: logging only, no repeated prompting
  4. Fallback default in renderer: 2000 kcal

CLI Commands

# Add a meal with explicit nutrition values
python3 scripts/calorie_visualizer.py add "food name" 500 25 [--photo /path/to/image.jpg]

# Add from local food database (local-first, online fallback optional)
python3 scripts/calorie_visualizer.py add-food "Subway chicken sandwich" --multiplier 1.0
python3 scripts/calorie_visualizer.py add-food "rice" --offline

# Daily summary
python3 scripts/calorie_visualizer.py summary

# Regenerate report image
python3 scripts/calorie_visualizer.py report

# Config
python3 scripts/calorie_visualizer.py config daily_goal 2000
python3 scripts/calorie_visualizer.py config user_refused_profile True

Dependencies

cd skills/calorie-visualizer
python3 -m pip install -r requirements.txt
  • Python libs: html2image, Pillow
  • Online fallback: optional USDA API (USDA_API_KEY)
  • Database: SQLite (built into Python)
  • Rendering: requires system Chromium/Chrome (called by html2image)

Storage

  • calorie_data.db (local SQLite)
  • No automatic external sync

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 07:18 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,205
content-creation

Humanizer

biostartechnology
消除AI写作痕迹,使文本更自然真实。基于维基百科"AI写作特征"指南,识别并修正夸张象征、宣传用语、肤浅-ing分析、模糊归因、破折号滥用、三项排比、AI词汇、负面平行结构及冗长连接词等模式。
★ 860 📥 199,867
security-compliance

Usage Visualizer

vintlin
高级使用统计与高保真可视化报告,专为OpenClaw。100%本地处理。审计验证隐私(不存储凭证)
★ 2 📥 1,369