diff --git a/doc/02-提交与贡献.md b/doc/02-提交与贡献.md index c5525eb6..6876cfc5 100644 --- a/doc/02-提交与贡献.md +++ b/doc/02-提交与贡献.md @@ -7,7 +7,7 @@ ! Contributors : Nul None ! | ! 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 文件的 `_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 - ``` - -
- - - ## 提交与审阅 当你提交 PR 的时候,一定要将 PR 指定 chsrc 原仓库的 `dev` 分支。 diff --git a/doc/10-如何编写recipe.md b/doc/10-如何编写recipe.md index 139b37f3..3e51606b 100644 --- a/doc/10-如何编写recipe.md +++ b/doc/10-如何编写recipe.md @@ -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` 搜索上述三种前缀 diff --git a/doc/50-协作者与维护者.md b/doc/50-协作者与维护者.md index 2e744a82..e1a307ba 100644 --- a/doc/50-协作者与维护者.md +++ b/doc/50-协作者与维护者.md @@ -7,10 +7,10 @@ ! Contributors : Nul None ! | ! Created On : <2024-12-06> - ! Last Modified : <2026-08-14> + ! Last Modified : <2026-09-01> ! ---------------------------------------------------------- --> -# 协作者与维护者 +## 协作者与维护者 想要达到最理想的维护状态,每一个 recipe 都需要有专人长时间维护。**我们的代码里使用了 recipe (某个菜的烹饪方法) 这个词,因而整个项目便和 "饮食" 有关,比如 `menu`: 汇集了所有的 dish 的菜单。因此,我们的维护者和贡献者身份依然使用了这个惯例:** @@ -23,3 +23,55 @@ 调味:一个 recipe 的次要贡献者
+ + + +## 第一次贡献者 + +### 注册身份信息 + +在 `src/chsrc-main.c` 的 `chsrc_register_contributors()` 函数里,在最后(我们按参与本项目的时间顺序排列)添加一行: + +```c +chef_register_contributor ("@ID: 你的GitHub/Gitee用户名或任意不与其他贡献者冲突的名字", + "你的真实姓名", + "你的邮箱地址", + "若 chsrc ls 的时候不想使用真实姓名,可以用这个参数的字符串来代替"); +``` + + +### 更新 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 + ``` + +
diff --git a/doc/chsrc.1 b/doc/chsrc.1 index cf5d6761..cc58ba03 100644 --- a/doc/chsrc.1 +++ b/doc/chsrc.1 @@ -6,10 +6,10 @@ .\" Contributors : Nul None .\" | .\" 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 diff --git a/doc/chsrc.texi b/doc/chsrc.texi index 49e0ae38..4787a9c5 100644 --- a/doc/chsrc.texi +++ b/doc/chsrc.texi @@ -6,15 +6,15 @@ @c Contributors : Nul None @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