Skip to content

Commit 876269c

Browse files
committed
update readme & useage guide
1 parent 9bfc777 commit 876269c

File tree

6 files changed

+53
-9
lines changed

6 files changed

+53
-9
lines changed

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,8 @@
1515
},
1616

1717
"files.autoSave": "afterDelay", // or "onFocusChange", "onWindowChange", "off"
18-
"files.autoSaveDelay": 1000 // Only relevant for "afterDelay", in milliseconds
18+
"files.autoSaveDelay": 1000,
19+
"files.associations": {
20+
"ostream": "cpp"
21+
} // Only relevant for "afterDelay", in milliseconds
1922
}

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
- **`[Familiarize]`** - The ability to solve unfamiliar C++ problems using documentation and [cppreference](https://cppreference.com)
2929
- **`[Understand]`** - How to participate in the technical community — using open-source projects, asking questions, joining discussions, or contributing
3030

31+
> [!CAUTION]
32+
> This project is currently in its early development stage. If you encounter any issues, feel free to create an issue for feedback or directly submit a PR to fix it.
33+
3134
## Quick Start
3235

3336
> Try `Code -> Book -> Video -> X -> Code`

README.zh.hant.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
- **`[熟悉]`** - 透過文件和[cppreference](https://cppreference.com)解決C++中不熟悉問題的能力
2929
- **`[了解]`** - 如何參與技術社群 - 開源專案的使用、提出問題、參與討論或貢獻
3030

31+
> [!CAUTION]
32+
> 該項目當前處於開發初期, 如果你發現任何問題, 歡迎創建issues反饋或直接提交PR進行修復
33+
3134
## 快速開始
3235

3336
> 嘗試 `Code -> Book -> Video -> X -> Code`

README.zh.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
[⌨️Code]: https://github.com/Sunrisepeak/mcpp-standard/tree/main/dslings
2222
[👥X]: https://forum.d2learn.org/category/20
2323

24+
> [!CAUTION]
25+
> 该项目当前处于开发初期, 如果你发现任何问题, 欢迎创建issues反馈或直接提交PR进行修复
26+
2427
## 目标
2528

2629
- **`[掌握]`** - **现代C++核心的语言特性**及使用场景

book/en/src/base/chapter_1.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ d2x book
5353
> Enter the project directory `mcpp-standard` and run the checker command to enter the practice code auto-detection program
5454
5555
```bash
56-
xlings checker
56+
d2x checker
5757
```
5858

5959
### Specify Exercise for Detection
6060

6161
```bash
62-
xlings checker [name]
62+
d2x checker [name]
6363
```
6464

6565
> Note: Exercise names support fuzzy matching
@@ -149,7 +149,23 @@ dslings/hello-mcpp.cpp -->> Current detected file
149149
Homepage: https://github.com/d2learn/xlings
150150
```
151151

152-
## 3. Resources and Communication
152+
## 3. Configure Project Language
153+
154+
Edit the `lang` attribute in the project configuration file `config.xlings`. `zh` corresponds to Chinese, and `en` corresponds to English.
155+
156+
```lua
157+
},
158+
159+
private = {
160+
-- project private attributes
161+
mcpp = {
162+
lang = "en", -- option: en, zh
163+
}
164+
},
165+
}
166+
```
167+
168+
## 4. Resources and Communication
153169

154170
**Communication Group (Q):** 167535744
155171

book/src/base/chapter_1.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
# 使用说明
1010

11-
**mcpp-standard**是一个强调动手实践的现代C++核心语言特性教程项目。基于[xlings(d2x)工具](https://github.com/Sunrisepeak/mcpp-standard)搭建了一套**编译器驱动开发模式**的代码练习, 可以自动化的检测练习代码的状态和跳转到下一个练习...
11+
**mcpp-standard**是一个强调动手实践的现代C++核心语言特性教程项目。基于[xlings(d2x)工具](https://github.com/d2learn/xlings)搭建了一套**编译器驱动开发模式**的代码练习, 可以自动化的检测练习代码的状态和跳转到下一个练习...
1212

1313
## 0.xlings工具安装
1414

@@ -53,13 +53,13 @@ d2x book
5353
> 进入项目目录`mcpp-standard`运行checker命令, 进入练习代码自动检测程序
5454
5555
```bash
56-
xlings checker
56+
d2x checker
5757
```
5858

5959
### 指定练习进行检测
6060

6161
```bash
62-
xlings checker [name]
62+
d2x checker [name]
6363
```
6464

6565
> 注: 练习名支持模糊匹配
@@ -74,7 +74,7 @@ d2x update
7474

7575
## 2.自动化检测程序简介
7676

77-
使用`xlings checker`进入自动化代码练习环境后, 工具会自动定位打开对应的练习代码文件, 并在控制台输出提示编译器的错误及提示信息。一般检测程序分两个检测阶段: 第一个是编译期检测, 即你需要通过练习代码中的提示信息和控制台编译器的报错, 修复代码的编译错误; 第二个是运行时检测, 即当前代码运行时是否能通过所有检查点。当修复编译错误并通过所有检查点时, 控制台就会显示当前练习通过并提示你进入下一个练习
77+
使用`d2x checker`进入自动化代码练习环境后, 工具会自动定位打开对应的练习代码文件, 并在控制台输出提示编译器的错误及提示信息。一般检测程序分两个检测阶段: 第一个是编译期检测, 即你需要通过练习代码中的提示信息和控制台编译器的报错, 修复代码的编译错误; 第二个是运行时检测, 即当前代码运行时是否能通过所有检查点。当修复编译错误并通过所有检查点时, 控制台就会显示当前练习通过并提示你进入下一个练习
7878

7979
**代码练习文件示例**
8080

@@ -147,7 +147,23 @@ dslings/hello-mcpp.cpp -->> 当前检测的文件
147147
Homepage: https://github.com/d2learn/xlings
148148
```
149149

150-
## 3.资源于交流
150+
## 3.配置项目语言
151+
152+
编辑项目配置文件`config.xlings`中的`lang`属性, `zh`对应中文, `en`对应英文
153+
154+
```lua
155+
},
156+
157+
private = {
158+
-- project private attributes
159+
mcpp = {
160+
lang = "en", -- option: en, zh
161+
}
162+
},
163+
}
164+
```
165+
166+
## 4.资源于交流
151167

152168
**交流群(Q):** 167535744
153169

0 commit comments

Comments
 (0)