2
1
mirror of https://github.com/Anduin2017/HowToCook.git synced 2026-10-25 17:36:12 +00:00

添加所有菜谱的预估卡路里数据并更新lint规则

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Anduin Xue 2026-05-15 06:36:48 +00:00
parent 88f2636c9f
commit 1448b50e0d
No known key found for this signature in database
363 changed files with 734 additions and 3 deletions

View File

@ -67,15 +67,17 @@ const validators = [
}
});
// 检查烹饪难度
// 检查烹饪难度和卡路里
const mainTitleIndex = titles.length > 0 ? lines.indexOf(titles[0]) : -1;
const firstSecondTitleIndex = sections.length > 0 ? lines.indexOf(sections[0]) : -1;
if (mainTitleIndex >= 0 && firstSecondTitleIndex >= 0 && mainTitleIndex < firstSecondTitleIndex) {
const contentBetweenTitles = lines.slice(mainTitleIndex + 1, firstSecondTitleIndex);
let hasDifficultyLine = false;
let hasCalorieLine = false;
const difficultyPatternGeneral = /^预估烹饪难度:(★*)$/;
const difficultyPatternStrict = /^预估烹饪难度:★{1,5}$/;
const caloriePattern = /^预估卡路里:\d+大卡$/;
for (const line of contentBetweenTitles) {
if (difficultyPatternGeneral.test(line)) {
@ -85,12 +87,17 @@ const validators = [
const starCount = starMatch ? starMatch.length : 0;
errors.push(`文件 ${filePath} 不符合仓库的规范!烹饪难度的星星数量必须在1-5颗之间!(当前为 ${starCount} 颗)`);
}
break;
}
if (caloriePattern.test(line)) {
hasCalorieLine = true;
}
}
if (!hasDifficultyLine) {
errors.push(`文件 ${filePath} 不符合仓库的规范!在大标题和第一个二级标题之间必须包含"预估烹饪难度:★★"格式的难度评级,星星数量必须在1-5颗之间!`);
}
if (!hasCalorieLine) {
errors.push(`文件 ${filePath} 不符合仓库的规范!在大标题和第一个二级标题之间必须包含"预估卡路里:XXX大卡"。`);
}
} else if (mainTitleIndex === -1 || firstSecondTitleIndex === -1) {
errors.push(`文件 ${filePath} 结构错误,无法定位烹饪难度区域。`);
}

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★★★
预估卡路里:815大卡
## 必备原料和工具
- 青蟹(别称:肉蟹)

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★★
预估卡路里:556大卡
## 必备原料和工具
- 鳝丝

View File

@ -6,6 +6,8 @@
预估烹饪难度:★★★★
预估卡路里:571大卡
## 必备原料和工具
- 小龙虾

View File

@ -10,6 +10,8 @@
预估烹饪难度:★★★
预估卡路里:309大卡
## 必备原料和工具
- 阿根廷红虾(选用了速冻虾)

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★★
预估卡路里:749大卡
## 必备原料和工具
原料:

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★★★
预估卡路里:248大卡
## 必备原料和工具
- 巴沙鱼

View File

@ -2,6 +2,8 @@
预估烹饪难度:★★★★
预估卡路里:584大卡
## 必备原料和工具
- 黑虎虾 or 明虾、

View File

@ -2,6 +2,8 @@
预估烹饪难度:★★★★
预估卡路里:2152大卡
## 必备原料和工具
- 草鱼(农贸市场或者超市让店家杀掉,去除不要的器官)

View File

@ -2,6 +2,8 @@
预估烹饪难度:★★★
预估卡路里:184大卡
## 必备原料和工具
* 生蚝

View File

@ -2,6 +2,8 @@
预估烹饪难度:★★★
预估卡路里:385大卡
## 必备原料和工具
- 鲈鱼(害怕杀鱼的同学可以让店家帮忙杀)

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★
预估卡路里:519大卡
## 必备原料和工具
- 活虾

View File

@ -2,6 +2,8 @@
预估烹饪难度:★★★★
预估卡路里:1011大卡
## 必备原料和工具
- 鲤鱼

View File

@ -7,6 +7,8 @@
预估烹饪难度:★★★★
预估卡路里:570大卡
## 必备原料和工具
- 姜、蒜瓣、干辣椒

View File

@ -5,6 +5,8 @@
预估烹饪难度:★★★★
预估卡路里:333大卡
## 必备原料和工具
- 注:如果有可能,尽量另准备一把菜刀,超市或市场上均有廉价且刀片更厚的菜刀,刀片厚度在 5-7mm 为最佳。

View File

@ -2,6 +2,8 @@
预估烹饪难度:★★★★
预估卡路里:1051大卡
## 必备原料和工具
- 大葱、姜、大蒜、干辣椒

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★★★
预估卡路里:2111大卡
## 必备原料和工具
- 肉蟹(推荐优先级从高到低:缅甸黑蟹、青蟹、梭子蟹、大闸蟹)

View File

@ -5,6 +5,8 @@
预估烹饪难度:★★★
预估卡路里:637大卡
## 必备原料和工具
* 罗氏虾

View File

@ -2,6 +2,8 @@
预估烹饪难度:★★★★
预估卡路里:311大卡
## 必备原料和工具
- 桂鱼

View File

@ -6,6 +6,8 @@
预估烹饪难度:★★★
预估卡路里:299大卡
## 必备原料和工具
- 泡发好的海参![海参](./海参.jpeg)

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★
预估卡路里:456大卡
## 必备原料和工具
* 海虾

View File

@ -6,6 +6,8 @@
预估烹饪难度:★★
预估卡路里:526大卡
## 必备原料和工具
- 大虾(推荐黑虎虾或基围虾)

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★★
预估卡路里:1229大卡
## 必备原料和工具
* 蛏子

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★★
预估卡路里:468大卡
## 必备原料和工具
- 螃蟹(首选河蟹,次选梭子蟹)

View File

@ -7,6 +7,8 @@
预估烹饪难度:★★★
预估卡路里:1092大卡
## 必备原料和工具
- 剑骨鱼或鲤鱼(约 1.5 斤,让店家处理内脏,但**不要刮鱼鳞**)

View File

@ -5,6 +5,8 @@
预估烹饪难度:★★★★
预估卡路里:820大卡
## 必备原料和工具
- 翘嘴鱼(肉食性鱼类,肉细腻,口感好)

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★★
预估卡路里:792大卡
## 必备原料和工具
- 食用油

View File

@ -5,6 +5,8 @@
预估烹饪难度:★★★
预估卡路里:524大卡
## 必备原料和工具
- 鳊鱼(鱼可以让摊主帮忙处理好)

View File

@ -6,6 +6,8 @@
预估烹饪难度:★★★
预估卡路里:741大卡
## 必备原料和工具
- 鲜虾(强推肉质紧实的九节虾,普通明虾也可以)

View File

@ -4,6 +4,8 @@
预估烹饪难度:★
预估卡路里:223大卡
## 必备原料和工具
- 新鲜吐司

View File

@ -2,6 +2,8 @@
预估烹饪难度:★★
预估卡路里:113大卡
## 必备原料和工具
- 鸡蛋

View File

@ -6,6 +6,8 @@
预估烹饪难度:★★
预估卡路里:86大卡
## 必备原料和工具
- 新鲜鸡蛋(推荐 AA 级)

View File

@ -4,6 +4,8 @@
预估烹饪难度:★
预估卡路里:169大卡
## 必备原料和工具
- 鸡蛋

View File

@ -4,6 +4,8 @@
预估烹饪难度:★
预估卡路里:151大卡
## 必备原料和工具
- 鸡蛋

View File

@ -4,6 +4,8 @@
预估烹饪难度:★
预估卡路里:308大卡
## 必备原料和工具
- 微波炉

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★★
预估卡路里:668大卡
## 必备原料和工具
- 意式猪肉香肠(去肠衣)、辣香肠 (Chorizo) 或切块的午餐肉

View File

@ -2,6 +2,8 @@
预估烹饪难度:★★
预估卡路里:1050大卡
---
## 必备原料和工具

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★
预估卡路里:617大卡
## 必备原料和工具
- 糯米(或大米)

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★
预估卡路里:108大卡
## 必备原料和工具
- 新鲜玉米

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★★
预估卡路里:72大卡
## 必备原料和工具
### 主食材

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★★
预估卡路里:72大卡
## 必备原料和工具
- 鸡蛋

View File

@ -3,6 +3,8 @@
预估烹饪难度:★★
预估卡路里:769大卡
## 必备原料和工具
- 饺子(速冻水饺)

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★
预估卡路里:535大卡
## 必备原料和工具
- 鸡蛋

View File

@ -4,6 +4,8 @@
预估烹饪难度:★
预估卡路里:421大卡
## 必备原料和工具
- 牛奶(巴氏奶口感更好)

View File

@ -4,6 +4,8 @@
预估烹饪难度:★
预估卡路里:254大卡
## 必备原料和工具
- 面包片

View File

@ -5,6 +5,8 @@
预估烹饪难度:★★
预估卡路里:258大卡
## 必备原料和工具
- 鸡蛋

View File

@ -9,6 +9,8 @@
预估烹饪难度:★★★
预估卡路里:599大卡
## 必备原料和工具
- 鸡蛋

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★★
预估卡路里:193大卡
## 必备原料和工具
- 鸡蛋

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★
预估卡路里:143大卡
## 必备原料和工具
- 新鲜鸡蛋

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★
预估卡路里:400大卡
## 必备原料和工具
- 冷冻花卷

View File

@ -6,6 +6,8 @@
预估烹饪难度:★★
预估卡路里:379大卡
## 必备原料和工具
- 鸡蛋

View File

@ -4,6 +4,8 @@
预估烹饪难度:★
预估卡路里:569大卡
## 必备原料和工具
- 水浸金枪鱼罐头(不建议用油浸,会很腻)

View File

@ -4,6 +4,8 @@
预估烹饪难度:★
预估卡路里:669大卡
## 必备原料和工具
- 鸡蛋

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★
预估卡路里:560大卡
## 必备原料和工具
- 鸡蛋

View File

@ -7,6 +7,8 @@
预估烹饪难度:★★★
预估卡路里:1854大卡
## 必备原料和工具
- 蒜头

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★
预估卡路里:111大卡
## 必备原料和工具
- 面粉

View File

@ -5,6 +5,8 @@
预估烹饪难度:★★
预估卡路里:1826大卡
## 必备原料和工具
- 干辣椒面(粗细都准备)

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★★★
预估卡路里:1028大卡
## 必备原料和工具
- 糖(任选其一):

View File

@ -6,6 +6,8 @@
预估烹饪难度:★★
预估卡路里:146大卡
## 必备原料和工具
- 清水

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★
预估卡路里:1940大卡
## 必备原料和工具
- 草莓

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★★
预估卡路里:2069大卡
## 必备原料和工具
- 油

View File

@ -2,6 +2,8 @@
预估烹饪难度:★★
预估卡路里:177大卡
## 必备原料和工具
- 蒜头

View File

@ -4,6 +4,8 @@
预估烹饪难度:★
预估卡路里:400大卡
## 必备原料和工具
原料

View File

@ -6,6 +6,8 @@
预估烹饪难度:★★★
预估卡路里:397大卡
## 必备原料和工具
- 荔浦芋头(电商平台购买即可,实惠新鲜)

View File

@ -6,6 +6,8 @@
预估烹饪难度:★★★★
预估卡路里:162大卡
## 必备原料和工具
- 125ml 淡奶油

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★★
预估卡路里:1160大卡
## 必备原料和工具
- 淡奶油(推荐品牌 安佳动物淡奶油)

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★★★★
预估卡路里:274大卡
## 必备原料和工具
### 工具

View File

@ -6,6 +6,8 @@
预估烹饪难度:★★★★
预估卡路里:809大卡
## 必备原料和工具
- 马斯卡彭芝士

View File

@ -6,6 +6,8 @@
预估烹饪难度:★★★★★
预估卡路里:176大卡
## 必备原料和工具
面包本体

View File

@ -6,6 +6,8 @@
预估烹饪难度:★★★
预估卡路里:1026大卡
## 必备原料和工具
- 牛奶

View File

@ -6,6 +6,8 @@
预估烹饪难度:★★
预估卡路里:266大卡
## 必备原料和工具
- 奶油奶酪:212g (这是一块的质量,比较方便,原教程是 250g)

View File

@ -6,6 +6,8 @@
预估烹饪难度:★★★★
预估卡路里:169大卡
## 必备原料和工具
该配方为整包蛋挞皮所需量 填充后可直接冷冻保存

View File

@ -6,6 +6,8 @@
预估烹饪难度:★★★
预估卡路里:863大卡
## 必备原料和工具
- 熟蛋黄

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★★
预估卡路里:622大卡
## 必备原料和工具
- 空气炸锅

View File

@ -6,6 +6,8 @@
预估烹饪难度:★★★
预估卡路里:374大卡
## 必备原料和工具
- 胡萝卜(建议选用红色胡萝卜)

View File

@ -6,6 +6,8 @@
预估烹饪难度:★★★★★
预估卡路里:160大卡
## 必备原料和工具
- 荔浦芋头(电商平台购买即可,实惠新鲜)

View File

@ -6,6 +6,8 @@
预估烹饪难度:★★★
预估卡路里:1197大卡
## 必备原料和工具
- 无盐黄油(推荐品牌总统)

View File

@ -5,6 +5,8 @@
预估烹饪难度:★★
预估卡路里:1653大卡
## 必备原料和工具
- 加糖炼乳

View File

@ -6,6 +6,8 @@
预估烹饪难度:★★★★
预估卡路里:1034大卡
## 必备原料和工具
- 淡奶油

View File

@ -6,6 +6,8 @@
预估烹饪难度:★★★
预估卡路里:1313大卡
## 必备原料和工具
### 工具

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★★★
预估卡路里:234大卡
## 必备原料和工具
### 工具

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★
预估卡路里:129大卡
---
## 必备原料和工具

View File

@ -9,6 +9,8 @@ B-52 是鸡尾酒中喝法比较独特的一种,要配上短吸管,餐巾纸
预估烹饪难度:★★★
预估卡路里:80大卡
## 必备原料和工具
- 甘露咖啡酒

View File

@ -7,6 +7,8 @@ Mojito 是一种传统的古巴高球鸡尾酒。
预估烹饪难度:★★★
预估卡路里:187大卡
## 必备原料和工具
- 打碎的冰块

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★
预估卡路里:296大卡
## 必备原料和工具
- 冬瓜

View File

@ -9,6 +9,8 @@
预估烹饪难度:★★
预估卡路里:110大卡
## 必备原料和工具
- 冰粉籽 200g

View File

@ -6,6 +6,8 @@
预估烹饪难度:★★
预估卡路里:135大卡
## 必备原料和工具
- 红茶(CTC 红茶最佳,或阿萨姆红茶)

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★
预估卡路里:450大卡
## 必备原料和工具
原料

View File

@ -2,6 +2,8 @@
预估烹饪难度:★
预估卡路里:184大卡
## 必备原料和工具
- 原料:

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★
预估卡路里:81大卡
## 必备原料和工具
- 袋泡红茶(推荐立顿黄牌精选红茶)

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★
预估卡路里:661大卡
## 必备原料和工具
- 杯子

View File

@ -4,6 +4,8 @@
预估烹饪难度:★
预估卡路里:141大卡
## 必备原料和工具
- 原料

View File

@ -7,6 +7,8 @@
预估烹饪难度:★★★
预估卡路里:185大卡
## 必备原料和工具
- 水

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★★
预估卡路里:173大卡
## 必备原料和工具
原料

View File

@ -4,6 +4,8 @@
预估烹饪难度:★
预估卡路里:392大卡
## 必备原料和工具
- 原味酸奶 (Plain yogurt)

View File

@ -10,6 +10,8 @@
预估烹饪难度:★★★
预估卡路里:173大卡
## 必备原料和工具
- 原料:

View File

@ -6,6 +6,8 @@
预估烹饪难度:★
预估卡路里:231大卡
## 必备原料和工具
- 瓶装椰汁(瓶口较大为佳)

View File

@ -4,6 +4,8 @@
预估烹饪难度:★★
预估卡路里:81大卡
## 必备原料和工具
- 原料:

View File

@ -6,6 +6,8 @@
预估烹饪难度:★★★
预估卡路里:180大卡
## 必备原料和工具
- 咖啡液(推荐浓缩或者冷萃)

View File

@ -6,6 +6,8 @@
预估烹饪难度:★★★★
预估卡路里:420大卡
## 必备原料和工具
- 糯米 800g(推荐使用圆糯米)

Some files were not shown because too many files have changed in this diff Show More