@rookiestar/eng-lang-tutor 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of @rookiestar/eng-lang-tutor might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/README.md +62 -50
  2. package/README_EN.md +67 -57
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -22,21 +22,30 @@
22
22
 
23
23
  ### 安装步骤
24
24
 
25
- 1. **克隆到您的 OpenClaw skills 目录:**
25
+ **方式一:npm 安装(推荐)**
26
+
27
+ ```bash
28
+ npm install -g @rookiestar/eng-lang-tutor
29
+ ```
30
+
31
+ 安装会自动执行,skill 将被安装到 `~/.openclaw/skills/eng-lang-tutor/`。
32
+
33
+ **方式二:从源码安装**
26
34
 
27
35
  ```bash
28
36
  cd ~/.openclaw/skills/
29
37
  git clone https://github.com/rookiestar/eng-lang-tutor.git
38
+ pip install -r eng-lang-tutor/requirements.txt
30
39
  ```
31
40
 
32
- 2. **验证安装:**
41
+ **验证安装:**
33
42
 
34
43
  ```bash
35
44
  openclaw skills list
36
45
  openclaw skills info eng-lang-tutor
37
46
  ```
38
47
 
39
- 3. **配置渠道:**
48
+ **配置渠道:**
40
49
 
41
50
  **Discord 配置:**
42
51
  ```bash
@@ -78,36 +87,46 @@ openclaw pairing approve discord YOUR_PAIRING_CODE
78
87
 
79
88
  ## 推送时间配置
80
89
 
81
- ### 默认推送时间(UTC+8)
82
-
83
- | 任务 | 时间 |
84
- |------|------|
85
- | 知识点 | 早上 6:45 |
86
- | 每日测验 | 晚上 10:45 |
87
-
88
- ### 自定义推送时间
90
+ ### Crontab 设置
89
91
 
90
- ```
91
- set schedule keypoint 7:00
92
- set schedule quiz 21:00
93
- ```
92
+ Skill 的定时推送依赖 crontab。在 onboarding 流程的 Step 6 会自动创建 cron 任务。
94
93
 
95
- ### Crontab 设置
94
+ 如需手动配置或修改:
96
95
 
97
96
  ```bash
98
97
  # 编辑 crontab
99
98
  crontab -e
100
99
 
101
- # 添加定时任务
100
+ # 添加定时任务(示例:北京时间 06:45 推送知识点,22:45 推送测验)
102
101
  CRON_TZ=Asia/Shanghai
103
102
 
104
- # 06:45 每日知识点
103
+ # 知识点推送
105
104
  45 6 * * * openclaw system event --text "Use eng-lang-tutor skill. Push today's keypoint." --mode now
106
105
 
107
- # 22:45 每日测验
106
+ # 测验推送
108
107
  45 22 * * * openclaw system event --text "Use eng-lang-tutor skill. Push today's quiz invitation." --mode now
109
108
  ```
110
109
 
110
+ ### 修改推送时间
111
+
112
+ 如需修改推送时间:
113
+
114
+ 1. **在 IM 中向 Bot 发送命令**更新偏好设置:
115
+
116
+ ```
117
+ set schedule keypoint 7:00 # 设置知识点推送时间为早上 7:00
118
+ set schedule quiz 21:00 # 设置测验推送时间为晚上 21:00
119
+ ```
120
+
121
+ 2. **同步更新 crontab**(修改对应的时间):
122
+
123
+ ```bash
124
+ crontab -e
125
+ # 将 45 6 改为 0 7,将 45 22 改为 0 21
126
+ ```
127
+
128
+ **注意:** 测验时间必须晚于知识点时间。时间格式为 24 小时制(HH:MM)。
129
+
111
130
  ## 游戏化系统
112
131
 
113
132
  ### XP 与等级
@@ -145,7 +164,8 @@ eng-lang-tutor/
145
164
  │ ├── gamification.py # 连胜/等级/徽章逻辑
146
165
  │ ├── dedup.py # 14天去重逻辑
147
166
  │ ├── command_parser.py # 用户命令解析
148
- └── cron_push.py # 定时内容推送
167
+ ├── cron_push.py # 定时内容推送
168
+ │ └── tts/ # TTS 语音合成模块
149
169
  ├── templates/
150
170
  │ ├── state_schema.json # 状态 JSON Schema
151
171
  │ ├── keypoint_schema.json # 知识点 JSON Schema
@@ -154,22 +174,16 @@ eng-lang-tutor/
154
174
  ├── references/
155
175
  │ └── resources.md # 主题化学习资源
156
176
  ├── examples/
157
- │ ├── sample_keypoint.json
158
- │ └── sample_quiz.json
159
- ├── tests/
160
- │ ├── conftest.py
161
- │ ├── test_state_manager.py
162
- │ ├── test_scorer.py
163
- │ ├── test_gamification.py
164
- │ ├── test_dedup.py
165
- │ ├── test_command_parser.py
166
- │ └── test_cron_push.py
167
- └── data/
168
- ├── state.json # 运行时状态
169
- ├── logs/ # 事件日志
170
- └── daily/ # 每日内容
177
+ │ ├── sample_keypoint.json # 知识点示例
178
+ │ └── sample_quiz.json # 测验示例
179
+ └── docs/
180
+ └── OPENCLAW_DEPLOYMENT.md # 部署文档
171
181
  ```
172
182
 
183
+ **数据存储位置:** `~/.openclaw/state/eng-lang-tutor/`
184
+
185
+ 可通过环境变量 `OPENCLAW_STATE_DIR` 自定义数据目录。
186
+
173
187
  ## 文档
174
188
 
175
189
  - [SKILL.md](SKILL.md) - 完整 Skill 文档
@@ -177,14 +191,7 @@ eng-lang-tutor/
177
191
 
178
192
  ## 开发
179
193
 
180
- ### 运行测试
181
-
182
- ```bash
183
- cd eng-lang-tutor
184
- pytest tests/ -v
185
- ```
186
-
187
- ### 运行演示
194
+ ### 本地调试
188
195
 
189
196
  ```bash
190
197
  python3 scripts/command_parser.py --demo
@@ -193,19 +200,24 @@ python3 scripts/cron_push.py --task status
193
200
 
194
201
  ## 服务器迁移
195
202
 
196
- 迁移到新服务器:
203
+ **迁移学习数据:**
197
204
 
198
205
  ```bash
199
- # 在源服务器上
200
- cd ~/.openclaw/skills/
201
- tar -czvf eng-lang-tutor-backup.tar.gz eng-lang-tutor/
206
+ # 在源服务器上打包数据
207
+ tar -czvf eng-lang-tutor-data.tar.gz -C ~/.openclaw/state eng-lang-tutor
202
208
 
203
209
  # 传输到新服务器
204
- scp eng-lang-tutor-backup.tar.gz user@new-server:~/
210
+ scp eng-lang-tutor-data.tar.gz user@new-server:~/
205
211
 
206
- # 在目标服务器上
207
- cd ~/.openclaw/skills/
208
- tar -xzvf ~/eng-lang-tutor-backup.tar.gz
212
+ # 在目标服务器上解压
213
+ mkdir -p ~/.openclaw/state
214
+ tar -xzvf ~/eng-lang-tutor-data.tar.gz -C ~/.openclaw/state
215
+ ```
216
+
217
+ **重新安装 skill:**
218
+
219
+ ```bash
220
+ npm install -g @rookiestar/eng-lang-tutor
209
221
  ```
210
222
 
211
223
  详细迁移指南请参见 [docs/OPENCLAW_DEPLOYMENT.md](docs/OPENCLAW_DEPLOYMENT.md)。
package/README_EN.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # eng-lang-tutor
2
2
 
3
- **地道美式英语导师** - An OpenClaw Skill for learning authentic American English expressions.
3
+ **Authentic American English Tutor** - An OpenClaw Skill for learning authentic American English expressions.
4
4
 
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
6
 
@@ -22,21 +22,30 @@
22
22
 
23
23
  ### Installation
24
24
 
25
- 1. **Clone to your OpenClaw skills directory:**
25
+ **Option 1: npm (Recommended)**
26
+
27
+ ```bash
28
+ npm install -g @rookiestar/eng-lang-tutor
29
+ ```
30
+
31
+ Installation runs automatically, skill will be installed to `~/.openclaw/skills/eng-lang-tutor/`.
32
+
33
+ **Option 2: From Source**
26
34
 
27
35
  ```bash
28
36
  cd ~/.openclaw/skills/
29
37
  git clone https://github.com/rookiestar/eng-lang-tutor.git
38
+ pip install -r eng-lang-tutor/requirements.txt
30
39
  ```
31
40
 
32
- 2. **Verify installation:**
41
+ **Verify Installation:**
33
42
 
34
43
  ```bash
35
44
  openclaw skills list
36
45
  openclaw skills info eng-lang-tutor
37
46
  ```
38
47
 
39
- 3. **Configure Channel:**
48
+ ### Configure Channel
40
49
 
41
50
  **Discord Configuration:**
42
51
  ```bash
@@ -44,7 +53,7 @@ openclaw config set discord.token YOUR_BOT_TOKEN
44
53
  openclaw config set discord.guildId YOUR_SERVER_ID
45
54
  ```
46
55
 
47
- 4. **Complete pairing:**
56
+ ### Complete Pairing
48
57
 
49
58
  When you first message the bot, you'll receive a pairing code. Approve it:
50
59
 
@@ -78,36 +87,46 @@ When you first interact with the bot, it will guide you through a 6-step onboard
78
87
 
79
88
  ## Schedule Configuration
80
89
 
81
- ### Default Schedule (UTC+8)
82
-
83
- | Task | Time |
84
- |------|------|
85
- | Knowledge Point | 6:45 AM |
86
- | Daily Quiz | 10:45 PM |
90
+ ### Crontab Setup
87
91
 
88
- ### Customize Schedule
92
+ The skill's scheduled push relies on crontab. Cron jobs are automatically created during onboarding Step 6.
89
93
 
90
- ```
91
- set schedule keypoint 7:00
92
- set schedule quiz 21:00
93
- ```
94
-
95
- ### Crontab Setup
94
+ For manual configuration or modification:
96
95
 
97
96
  ```bash
98
97
  # Edit crontab
99
98
  crontab -e
100
99
 
101
- # Add scheduled tasks
100
+ # Add scheduled tasks (example: 06:45 keypoint, 22:45 quiz in Beijing time)
102
101
  CRON_TZ=Asia/Shanghai
103
102
 
104
- # 06:45 Daily keypoint
103
+ # Keypoint push
105
104
  45 6 * * * openclaw system event --text "Use eng-lang-tutor skill. Push today's keypoint." --mode now
106
105
 
107
- # 22:45 Daily quiz
106
+ # Quiz push
108
107
  45 22 * * * openclaw system event --text "Use eng-lang-tutor skill. Push today's quiz invitation." --mode now
109
108
  ```
110
109
 
110
+ ### Modify Schedule
111
+
112
+ To change push times:
113
+
114
+ 1. **Send command to Bot via IM** to update preferences:
115
+
116
+ ```
117
+ set schedule keypoint 7:00 # Set keypoint push time to 7:00 AM
118
+ set schedule quiz 21:00 # Set quiz push time to 9:00 PM
119
+ ```
120
+
121
+ 2. **Update crontab accordingly** (modify the corresponding times):
122
+
123
+ ```bash
124
+ crontab -e
125
+ # Change 45 6 to 0 7, and 45 22 to 0 21
126
+ ```
127
+
128
+ **Note:** Quiz time must be later than keypoint time. Time format is 24-hour (HH:MM).
129
+
111
130
  ## Gamification
112
131
 
113
132
  ### XP & Levels
@@ -118,10 +137,10 @@ This system has two independent level systems:
118
137
 
119
138
  | Level Range | XP Required | Stage |
120
139
  |-------------|-------------|-------|
121
- | 1-5 | 0-350 | Starter (启程者) |
122
- | 6-10 | 550-2000 | Traveler (行路人) |
123
- | 11-15 | 2600-6000 | Explorer (探索者) |
124
- | 16-20 | 7200-15000 | Pioneer (开拓者) |
140
+ | 1-5 | 0-350 | Starter |
141
+ | 6-10 | 550-2000 | Traveler |
142
+ | 11-15 | 2600-6000 | Explorer |
143
+ | 16-20 | 7200-15000 | Pioneer |
125
144
 
126
145
  ### Badges
127
146
 
@@ -145,7 +164,8 @@ eng-lang-tutor/
145
164
  │ ├── gamification.py # Streak/level/badge logic
146
165
  │ ├── dedup.py # 14-day deduplication
147
166
  │ ├── command_parser.py # User command parsing
148
- └── cron_push.py # Scheduled content push
167
+ ├── cron_push.py # Scheduled content push
168
+ │ └── tts/ # TTS module
149
169
  ├── templates/
150
170
  │ ├── state_schema.json # State JSON Schema
151
171
  │ ├── keypoint_schema.json # Keypoint JSON Schema
@@ -154,22 +174,16 @@ eng-lang-tutor/
154
174
  ├── references/
155
175
  │ └── resources.md # Themed learning resources
156
176
  ├── examples/
157
- │ ├── sample_keypoint.json
158
- │ └── sample_quiz.json
159
- ├── tests/
160
- │ ├── conftest.py
161
- │ ├── test_state_manager.py
162
- │ ├── test_scorer.py
163
- │ ├── test_gamification.py
164
- │ ├── test_dedup.py
165
- │ ├── test_command_parser.py
166
- │ └── test_cron_push.py
167
- └── data/
168
- ├── state.json # Runtime state
169
- ├── logs/ # Event logs
170
- └── daily/ # Daily content
177
+ │ ├── sample_keypoint.json # Sample keypoint
178
+ │ └── sample_quiz.json # Sample quiz
179
+ └── docs/
180
+ └── OPENCLAW_DEPLOYMENT.md # Deployment docs
171
181
  ```
172
182
 
183
+ **Data Location:** `~/.openclaw/state/eng-lang-tutor/`
184
+
185
+ Customize via `OPENCLAW_STATE_DIR` environment variable.
186
+
173
187
  ## Documentation
174
188
 
175
189
  - [SKILL.md](SKILL.md) - Full skill documentation
@@ -177,14 +191,7 @@ eng-lang-tutor/
177
191
 
178
192
  ## Development
179
193
 
180
- ### Run Tests
181
-
182
- ```bash
183
- cd eng-lang-tutor
184
- pytest tests/ -v
185
- ```
186
-
187
- ### Run Demo
194
+ ### Local Debugging
188
195
 
189
196
  ```bash
190
197
  python3 scripts/command_parser.py --demo
@@ -193,22 +200,25 @@ python3 scripts/cron_push.py --task status
193
200
 
194
201
  ## Migration
195
202
 
196
- To migrate to a new server:
203
+ **Migrate Learning Data:**
197
204
 
198
205
  ```bash
199
- # On source server
200
- cd ~/.openclaw/skills/
201
- tar -czvf eng-lang-tutor-backup.tar.gz eng-lang-tutor/
206
+ # On source server, backup data
207
+ tar -czvf eng-lang-tutor-data.tar.gz -C ~/.openclaw/state eng-lang-tutor
202
208
 
203
209
  # Transfer to new server
204
- scp eng-lang-tutor-backup.tar.gz user@new-server:~/
210
+ scp eng-lang-tutor-data.tar.gz user@new-server:~/
205
211
 
206
- # On target server
207
- cd ~/.openclaw/skills/
208
- tar -xzvf ~/eng-lang-tutor-backup.tar.gz
212
+ # On target server, extract
213
+ mkdir -p ~/.openclaw/state
214
+ tar -xzvf ~/eng-lang-tutor-data.tar.gz -C ~/.openclaw/state
209
215
  ```
210
216
 
211
- See [docs/OPENCLAW_DEPLOYMENT.md](docs/OPENCLAW_DEPLOYMENT.md) for detailed migration guide.
217
+ **Reinstall Skill:**
218
+
219
+ ```bash
220
+ npm install -g @rookiestar/eng-lang-tutor
221
+ ```
212
222
 
213
223
  ## License
214
224
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rookiestar/eng-lang-tutor",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "English language tutor skill for OpenClaw - Learn authentic American English expressions with gamification",
5
5
  "keywords": [
6
6
  "english",