Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 8 additions & 8 deletions .github/manual_lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const fsSyncAccess = require("fs");

const MAX_FILE_SIZE = 1024 * 1024; // 1MB
// glob 模式,定位菜谱 Markdown 文件和所有文件
const DISHES_GLOB = path.resolve(__dirname, '../dishes/**/*.md');
const ALL_FILES_GLOB = path.resolve(__dirname, '../dishes/**/*');
const DISHES_GLOB = path.resolve(__dirname, '../dishes/**/*.md').replace(/\\/g, '/');
const ALL_FILES_GLOB = path.resolve(__dirname, '../dishes/**/*').replace(/\\/g, '/');

// 工具函数:获取文件状态,包括大小
async function getFileStats(filePath) {
Expand Down Expand Up @@ -47,7 +47,7 @@ const validators = [
}

const sections = lines.filter(l => l.startsWith('## '));
const requiredSections = ['## 必备原料和工具', '## 计算', '## 操作', '## 附加内容'];
const requiredSections = ['## 工具', '## 原料', '## 操作', '## 附加内容'];


if (sections.length !== requiredSections.length) {
Expand Down Expand Up @@ -125,7 +125,7 @@ const validators = [

// 检查菜谱中不得出现 HTML 注释(示例菜模板除外)
async (filePath, lines, errors) => {
if (filePath.includes('template/示例菜')) return;
if (filePath.replace(/\\/g, '/').includes('template/示例菜')) return;

const rawContent = await fs.readFile(filePath, 'utf8');
if (rawContent.includes('<!--')) {
Expand Down Expand Up @@ -164,10 +164,10 @@ const validators = [
async (filePath, lines, errors) => {
const hasPortion = lines.some(l => l.includes('份数'));
const hasTotal = lines.some(l => l.includes('总量'));
const hasTemplateLine = lines.some(l => l.includes('每次制作前需要确定计划做几份。一份正好够'));
const hasTemplateLine = lines.some(l => l.includes('制作前需要确定计划做几份'));

if (hasPortion && (!hasTotal || !hasTemplateLine)) {
errors.push(`文件 ${filePath} 不符合仓库的规范!它使用份数作为基础,这种情况下一般是一次制作,制作多份的情况。请标明:总量 并写明 '每次制作前需要确定计划做几份。一份正好够 几 个人食用。'。`);
errors.push(`文件 ${filePath} 不符合仓库的规范!它使用份数作为基础,这种情况下一般是一次制作,制作多份的情况。请标明:总量 并写明 '当前 N 份量约 X 人,制作前需要确定计划做几份。'。`);
}
if (lines.some(l => l.includes('每人') || l.includes('人数'))) {
errors.push(`文件 ${filePath} 不符合仓库的规范!请基于每道菜\\每份为基准。不要基于人数。人数是一个可能会导致在应用中发生问题的单位。如果需要面向大量的人食用,请标明一个人需要几份。`);
Expand All @@ -184,7 +184,7 @@ const validators = [

// 检查菜谱描述:30-300字,需包含特点、营养价值、难度、制作时长
async (filePath, lines, errors) => {
if (filePath.includes('template/示例菜')) return;
if (filePath.replace(/\\/g, '/').includes('template/示例菜')) return;

const titles = lines.filter(l => l.startsWith('#'));
const mainTitleIndex = titles.length > 0 ? lines.indexOf(titles[0]) : -1;
Expand Down Expand Up @@ -215,7 +215,7 @@ const validators = [

// 检查图片 alt 文本质量
async (filePath, lines, errors) => {
if (filePath.includes('template/示例菜')) return;
if (filePath.replace(/\\/g, '/').includes('template/示例菜')) return;

const content = lines.join('\n');
const altRegex = /!\[([^\]]*)\]\([^)]+\.(?:jpg|jpeg|png|gif|webp|svg)\)/gi;
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ docker run -d -p 5000:5000 aiursoft/howtocookviewer
- [粉蒸肉](dishes/meat_dish/粉蒸肉.md)
- [腐乳肉](dishes/meat_dish/腐乳肉.md)
- [干煸仔鸡](dishes/meat_dish/干煸仔鸡/干煸仔鸡.md)
- [宫保鸡丁](dishes/meat_dish/宫保鸡丁/宫保鸡丁.md)
- [宫保鸡丁(基础版)](dishes/meat_dish/宫保鸡丁/宫保鸡丁(基础版).md)
- [宫保鸡丁(进阶版)](dishes/meat_dish/宫保鸡丁/宫保鸡丁(进阶版).md)
- [咕噜肉](dishes/meat_dish/咕噜肉.md)
- [广式萝卜牛腩](dishes/meat_dish/广式萝卜牛腩/广式萝卜牛腩.md)
- [贵州辣子鸡](dishes/meat_dish/贵州辣子鸡/贵州辣子鸡.md)
Expand Down
30 changes: 14 additions & 16 deletions dishes/aquatic/咖喱炒蟹.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,26 @@

预估卡路里:815 大卡

## 必备原料和工具
## 工具

- 青蟹(别称:肉蟹)
- 咖喱块(推介乐惠蟹黄咖喱)
- 洋葱
- 椰浆
- 鸡蛋
- 生粉(别称:淀粉)
- 大蒜
| 工具 | 备注 |
| --- | --- |

## 计算
## 原料

每次制作前需要确定计划做几份。一份正好够 1 个人食用
当前 1 份量约 1 人,制作前需要确定计划做几份。

总量:

- 肉蟹 1 只(大约 300g) * 份数
- 咖喱块 15g(一小块)*份数
- 椰浆 100ml*份数
- 鸡蛋 1 个 *份数
- 洋葱 200g *份数
- 大蒜 5 瓣 *份数
| 食材 | 用量 | 分组 | 备注 |
| --- | --- | --- | --- |
| 青蟹 | 1 只 × 份数 | | 别称:肉蟹;大约 300g |
| 咖喱块 | 15g × 份数 | | 推介乐惠蟹黄咖喱;一小块 |
| 洋葱 | 200g × 份数 | | |
| 椰浆 | 100ml × 份数 | | |
| 鸡蛋 | 1 个 × 份数 | | |
| 淀粉 | | | 别称:淀粉;生粉 |
| 蒜 | 5 瓣 × 份数 | | |

## 操作

Expand Down
53 changes: 21 additions & 32 deletions dishes/aquatic/响油鳝丝.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,33 @@

预估卡路里:556 大卡

## 必备原料和工具
## 工具

- 鳝丝
- 大蒜
- 姜末
- 料酒
- 生抽
- 蚝油
- 老抽
- 食用盐
- 白糖
- 胡椒粉
- 淀粉
- 蒜末
- 葱花
- 猪油
| 工具 | 备注 |
| --- | --- |

## 计算
## 原料

每次制作前需要确定计划做几份。一份够 2 个人吃。
当前 1 份量约 2 人,制作前需要确定计划做几份。

每份:

- 鳝丝 400 g
- 大蒜 40 g
- 姜末 20 g
- 料酒 13 g
- 生抽 3 g
- 蚝油 2 g
- 老抽 2 g
- 食用盐 2 g
- 白糖 6-15 g
- 胡椒粉 3.5-8 g
- 淀粉 10 g
- 水 50 g
- 蒜末 40 g
- 葱花 15 g
- 猪油 20 g
| 食材 | 用量 | 分组 | 备注 |
| --- | --- | --- | --- |
| 鳝丝 | 400 g | | |
| 蒜 | 40 g | | 蒜末 |
| 姜 | 20 g | | 姜末 |
| 料酒 | 13 g | | |
| 生抽 | 3 g | | |
| 蚝油 | 2 g | | |
| 老抽 | 2 g | | |
| 食用盐 | 2 g | | |
| 白糖 | 6-15 g | | |
| 胡椒粉 | 3.5-8 g | | |
| 淀粉 | 10 g | | |
| 葱 | 15 g | | 葱花 |
| 猪油 | 20 g | | |
| 水 | 50 g | | |

## 操作

Expand Down
54 changes: 22 additions & 32 deletions dishes/aquatic/小龙虾/小龙虾.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,43 +8,33 @@

预估卡路里:571 大卡

## 必备原料和工具
## 工具

- 小龙虾
- 油
- 香叶
- 八角
- 桂皮
- 青花椒
- 花椒
- 子弹头辣椒
- 葱姜蒜
- 郫县豆瓣
- 黄豆酱
- 啤酒
- 生抽
- 盐
| 工具 | 备注 |
| --- | --- |

## 计算
## 原料

以下是两斤小龙虾的量,按比例调整就好。

- 小龙虾 = 2 斤
- 油 = 70 毫升(这是平时炒菜 3 倍量)
- 香叶 = 两片
- 八角 = 一个
- 桂皮 = 3 克
- 青花椒 = 10 克
- 花椒 = 10 克
- 子弹头辣椒 = 5 克
- 葱 = 一根大葱
- 姜 = 30 克
- 蒜 = 7 瓣大蒜
- 郫县豆瓣 = 30 克
- 黄豆酱 = 30 克
- 啤酒 = 500 毫升
- 生抽 = 30 毫升
- 盐 = 10 克
| 食材 | 用量 | 分组 | 备注 |
| --- | --- | --- | --- |
| 小龙虾 | 2 斤 | | |
| 油 | 70 毫升 | | 这是平时炒菜 3 倍量 |
| 香叶 | 两片 | | |
| 八角 | 一个 | | |
| 桂皮 | 3 克 | | |
| 青花椒 | 10 克 | | |
| 花椒 | 10 克 | | |
| 子弹头辣椒 | 5 克 | | |
| 葱 | 1 根 | | 大葱 |
| 姜 | 30 克 | | |
| 蒜 | 7 瓣 | | 大蒜 |
| 郫县豆瓣 | 30 克 | | |
| 黄豆酱 | 30 克 | | |
| 啤酒 | 500 毫升 | | |
| 生抽 | 30 毫升 | | |
| 盐 | 10 克 | | |

## 操作

Expand Down
44 changes: 19 additions & 25 deletions dishes/aquatic/干煎阿根廷红虾/干煎阿根廷红虾.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,25 @@

预估卡路里:309 大卡

## 必备原料和工具

- 阿根廷红虾(选用了速冻虾)
- 海盐(研磨装)
- 黑胡椒(研磨装)
- 白葡萄酒
- 生抽
- 香菜
- 柠檬
- 洋葱
- 生姜
- 大蒜

## 计算

- 阿根廷红虾 2-3 只
- 海盐 5g
- 黑胡椒(研磨装)
- 白葡萄酒 20ml
- 生抽 1ml
- 香菜 3 片
- 柠檬 1 片
- 洋葱 10g
- 生姜 10g
- 大蒜 10g
## 工具

| 工具 | 备注 |
| --- | --- |

## 原料

| 食材 | 用量 | 分组 | 备注 |
| --- | --- | --- | --- |
| 阿根廷红虾 | 2-3 只 | | 选用了速冻虾 |
| 海盐 | 5g | | 研磨装 |
| 黑胡椒 | | | 研磨装 |
| 白葡萄酒 | 20ml | | |
| 生抽 | 1ml | | |
| 香菜 | 3 片 | | |
| 柠檬 | 1 片 | | |
| 洋葱 | 10g | | |
| 姜 | 10g | | 生姜 |
| 蒜 | 10g | | |

## 操作

Expand Down
41 changes: 15 additions & 26 deletions dishes/aquatic/微波葱姜黑鳕鱼.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,26 @@

预估卡路里:749 大卡

## 必备原料和工具
## 工具

原料:
| 工具 | 备注 |
| --- | --- |
| 密封袋 | |

- 黑鳕鱼,带皮

调味料:

- 青葱
- 姜
- 料酒
- 酱油
- 芝麻油
- 花生油

工具:

- 密封袋

## 计算
## 原料

每 2 份:

- 黑鳕鱼,带皮,2 片,450g(本菜谱主角,所有调料可根据鳕鱼的实际重量进行比例调整)
- 青葱,葱白,25g。
- 青葱,葱绿,10g。
- 姜,13g。
- 料酒,5mL。
- 酱油,25mL。
- 芝麻油,2mL。
- 花生油,50mL。
| 食材 | 用量 | 分组 | 备注 |
| --- | --- | --- | --- |
| 黑鳕鱼 | 2 片,450g | | 带皮;本菜谱主角,所有调料可根据鳕鱼的实际重量进行比例调整 |
| 葱绿 | 10g | | |
| 葱白 | 25g | 调料 | |
| 姜 | 13g | 调料 | |
| 料酒 | 5mL | 调料 | |
| 酱油 | 25mL | 调料 | |
| 香油 | 2mL | 调料 | |
| 花生油 | 50mL | 调料 | |

## 操作

Expand Down
Loading
Loading