更新文档

This commit is contained in:
Aoran Zeng committed 2026-09-01 17:25:50 +08:00
1 parent 1d55f85afa
commit 75d1f50868
5 files changed
+62 -65

No files matched your search

+1 -53
View File
@@ -7,7 +7,7 @@
! Contributors : Nul None <nul@none.org>
! |
! Created On : <2024-12-13>
! Last Modified : <2026-03-25>
! Last Modified : <2026-09-01>
! ---------------------------------------------------------- -->
# 贡献说明
@@ -22,58 +22,6 @@
## 第一次贡献者
### 注册身份信息
在 `src/chsrc-main.c` 的 `chsrc_register_contributors()` 函数里,在最后(我们按参与本项目的时间顺序排列)添加一行:
```c
chef_register_contributor ("@ID: 你的GitHub/Gitee用户名或任意不与其他贡献者冲突的名字",
"你的真实姓名",
"你的邮箱地址",
"若 chsrc ls <recipe> 的时候不想使用真实姓名,可以用这个参数的字符串来代替");
```
### 更新 Recipe 信息
在你修改的 recipe 文件的 `_prepare()` 函数里,需要做以下更新:
1. **更新 recipe 修改时间**(每次修改 recipe 代码都要更新):
```c
chef_set_recipe_last_updated (this, "YYYY-MM-DD");
```
2. **更新镜像源信息时间**(仅当你修改了镜像源列表时才更新):
```c
chef_set_sources_last_updated (this, "YYYY-MM-DD");
```
3. **将自己加入 `sauciers`**(次要贡献者列表,将计数加一并添加自己的 `@ID`):
```c
// 原来是 0 个 saucier:
chef_set_sauciers (this, 0);
// 改为添加你自己:
chef_set_sauciers (this, 1, "@你刚注册的ID");
// 原来已有 1 个 saucier:
chef_set_sauciers (this, 1, "@Someone");
// 改为添加你自己:
chef_set_sauciers (this, 2, "@Someone", "@你刚注册的ID");
```
4. **验证上述信息正确**
```sh
# 应当能看到你的信息
./chsrc ls <recipe>
```
<br>
## 提交与审阅
当你提交 PR 的时候,一定要将 PR 指定 chsrc 原仓库的 `dev` 分支。
+2 -5
View File
@@ -7,7 +7,7 @@
! Contributors : @Mikachu2333
! |
! Created On : <2024-08-19>
! Last Modified : <2026-08-12>
! Last Modified : <2026-09-01>
! ---------------------------------------------------------- -->
# Write A Recipe Even If You Don't Know C
@@ -93,11 +93,8 @@
8. 按需实现 `_setsrc()` `_getsrc()` `_resetsrc()`, 可以使用这些函数:
1. `framework/core.c` 中以 `chsrc_` 开头的所有函数或宏
1. `framework/*.c` 中以 `chsrc_`, `chef_`, `hp_` 开头的所有函数或宏
2. `xy.h` 中以 `xy_` 开头的所有函数或宏
3. `chec.c` 中以 `chef_` 开头的所有函数或宏
4. `dish.c` 中以 `dish_` 开头的所有函数或宏
5. `helper.c` 中以 `hp_` 开头的所有函数或宏
一个简单的方法是,在 VS Code 中按快捷键 `Ctrl-T` 搜索上述三种前缀
+54 -2
View File
@@ -7,10 +7,10 @@
! Contributors : Nul None <nul@none.org>
! |
! Created On : <2024-12-06>
! Last Modified : <2026-08-14>
! Last Modified : <2026-09-01>
! ---------------------------------------------------------- -->
# 协作者与维护者
## 协作者与维护者
想要达到最理想的维护状态,每一个 recipe 都需要有专人长时间维护。**我们的代码里使用了 recipe (某个菜的烹饪方法) 这个词,因而整个项目便和 "饮食" 有关,比如 `menu`: 汇集了所有的 dish 的菜单。因此,我们的维护者和贡献者身份依然使用了这个惯例:**
@@ -23,3 +23,55 @@
调味:一个 recipe 的次要贡献者
<br>
## 第一次贡献者
### 注册身份信息
在 `src/chsrc-main.c` 的 `chsrc_register_contributors()` 函数里,在最后(我们按参与本项目的时间顺序排列)添加一行:
```c
chef_register_contributor ("@ID: 你的GitHub/Gitee用户名或任意不与其他贡献者冲突的名字",
"你的真实姓名",
"你的邮箱地址",
"若 chsrc ls <recipe> 的时候不想使用真实姓名,可以用这个参数的字符串来代替");
```
### 更新 Recipe 信息
在你修改的 recipe 文件的 `_prepare()` 函数里,需要做以下更新:
1. **更新 recipe 修改时间**(每次修改 recipe 代码都要更新):
```c
chef_set_recipe_last_updated (this, "YYYY-MM-DD");
```
2. **更新镜像源信息时间**(仅当你修改了镜像源列表时才更新):
```c
chef_set_sources_last_updated (this, "YYYY-MM-DD");
```
3. **将自己加入 `sauciers`**(次要贡献者列表,将计数加一并添加自己的 `@ID`):
```c
// 原来是 0 个 saucier:
chef_set_sauciers (this, 0);
// 改为添加你自己:
chef_set_sauciers (this, 1, "@你刚注册的ID");
// 原来已有 1 个 saucier:
chef_set_sauciers (this, 1, "@Someone");
// 改为添加你自己:
chef_set_sauciers (this, 2, "@Someone", "@你刚注册的ID");
```
4. **验证上述信息正确**
```sh
# 应当能看到你的信息
./chsrc ls <recipe>
```
<br>
+2 -2
View File
@@ -6,10 +6,10 @@
.\" Contributors : Nul None <nul@none.org>
.\" |
.\" Created On : <2024-08-21>
.\" Last Modified : <2026-08-12>
.\" Last Modified : <2026-08-22>
.\" ----------------------------------------------------------------
.TH chsrc 1 "2026-08-12" "v0.2.6" "RubyMetric chsrc"
.TH chsrc 1 "2026-08-22" "v0.2.7" "RubyMetric chsrc"
.SH NAME
chsrc - Change Source for every software on every platform from the command line
+3 -3
View File
@@ -6,15 +6,15 @@
@c Contributors : Nul None <nul@none.org>
@c |
@c Created On : <2024-08-22>
@c Last Modified : <2026-08-12>
@c Last Modified : <2026-08-22>
@c --------------------------------------------------------------
\input texinfo
@setfilename chsrc.info
@settitle chsrc
@set Chsrc_Version v0.2.6
@set Doc_Publish_Date 2026-08-12
@set Chsrc_Version v0.2.7
@set Doc_Publish_Date 2026-08-22
@copying
@comment 这是软件copyright,不是文档copyright,因此不放在titlepage