Skip to content

Commit

Permalink
feat: tutorial-feishu-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiehe99 committed Jan 18, 2025
1 parent 44e2949 commit f2cef86
Show file tree
Hide file tree
Showing 31 changed files with 353 additions and 43 deletions.
Binary file modified banzhuren-notifier.zip
Binary file not shown.
10 changes: 8 additions & 2 deletions docs/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,21 @@ export const LanRequirement = ({}) => (

## 需要的东西

- **<LanRequirement></LanRequirement>**
{/* - **<LanRequirement></LanRequirement>** */}

:::info

教室的电脑能使用共享【必须】。

:::

## 如何使用及配置

:::tip

按照左侧导航栏的指引即可。

:::
:::

## Warnning

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial-bat/_category_.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"label": "自动传递通知",
"label": "自动传递班主任通知",
"position": 2,
"link": {
"type": "generated-index",
Expand Down
16 changes: 8 additions & 8 deletions docs/tutorial-bat/closing-configuration.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
slug: closing-configuration
description: 教室电脑配置自动关闭通知的指南
description: 教室电脑配置【自动】关闭通知的指南
sidebar_position: 5
---

Expand All @@ -11,21 +11,21 @@ sidebar_position: 5
1. 按住【win】键,再按【Q】键
2. 搜索【任务计划程序】,打开之后这个东西大概长这样(在下面的图片上按鼠标的【右键】可以放大看):

![Task Scheduler](/img/task_scheduler.png)
![Task Scheduler](/img/task-scheduler.png)

3. 点击右边的【创建任务】
4. 在弹出的【创建任务】窗口中,【常规】下面的【名称】随便填
5. 点击【触发器】,点击【新建】

![Create A Task](/img/create_a_task.png)
![Create A Task](/img/create-a-task.png)

6. 在弹出的【新建触发器】窗口中,设置你希望通知 Word 文档什么时候自动关闭。

建议:在进行下面的操作之前,稍微校对教室电脑的日期和时间

比如,你希望通知 Word 文档在周一至周五的下课时间 08:28 自动关闭,那就设置成下面图片这样:

![Create A Closing Trigger](/img/create_a_closing_trigger.png)
![Create A Closing Trigger](/img/create-a-closing-trigger.png)

建议:不要设置成上课的时候才自动关闭班主任的通知 Word 文档,留 2-3 分钟给科任老师提前到教室
7. **上一步设置的【触发器】可以设置多个!**
Expand All @@ -38,23 +38,23 @@ sidebar_position: 5

9. 在弹出来的【新建操作】窗口中,点击【浏览】

![Create an Operation](/img/create_an_operation.png)
![Create an Operation](/img/create-an-operation.png)

10. 如果教室的电脑使用的是 Word:

找到在【教室电脑】中的文件夹【`banzhuren-notifier`】中的 `close_word` 或者 `close_word.bat` 文件,点击【打开】

![open_the_close_word_bat](/img/open_the_close_word_bat.png)
![open_the_close_word_bat](/img/open-the-close-word-bat.png)

如果教室的电脑使用的是 WPS:

找到在【教室电脑】中的文件夹【`banzhuren-notifier`】中的 `close_wps` 或者 `close_wps.bat` 文件,点击【打开】

![open_the_close_wps_bat](/img/open_the_close_wps_bat.png)
![open_the_close_wps_bat](/img/open-the-close-wps-bat.png)

11. 一路【确定】回到【任务计划程序】界面

![Task Scheduler](/img/task_scheduler.png)
![Task Scheduler](/img/task-scheduler.png)

:::tip 恭喜!

Expand Down
20 changes: 10 additions & 10 deletions docs/tutorial-bat/openning-configuration.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
slug: openning-configuration
description: 教室电脑配置自动打开通知的指南
description: 教室电脑配置【自动】打开通知的指南
sidebar_position: 4
---

Expand All @@ -19,9 +19,9 @@ sidebar_position: 4
SHARED_FOLDER=
```

- `HOSTNAME` 为教师共享的计算机名(如 `马冬梅`)或者 ip(如:`10.50.89.179`
- `USERNAME` 为访问教师共享文件夹所需要输入的用户名(如:`syzx`
- `USERNAME` 为访问教师共享文件夹所需要输入的密码(如:`syzx-1993`
- `HOSTNAME` 为班主任共享的计算机名(如 `马冬梅`)或者 ip(如:`10.50.89.179`
- `USERNAME` 为访问班主任共享文件夹所需要输入的用户名(如:`syzx`
- `USERNAME` 为访问班主任共享文件夹所需要输入的密码(如:`syzx-1993`
- `SHARED_FOLDER` 为通知 Word 文档所在的共享文件夹名字(如:`共享文件夹`

填写完成之后大概长这样:
Expand All @@ -36,21 +36,21 @@ sidebar_position: 4
4. 按住【win】键,再按【Q】键
5. 搜索【任务计划程序】,打开之后这个东西大概长这样(在下面的图片上按鼠标的【右键】可以放大看):

![Task Scheduler](/img/task_scheduler.png)
![Task Scheduler](/img/task-scheduler.png)

6. 点击右边的【创建任务】
7. 在弹出的窗口中,【常规】下面的【名称】随便填
8. 点击【触发器】,点击【新建】

![Create A Task](/img/create_a_task.png)
![Create A Task](/img/create-a-task.png)

9. 在弹出的【新建触发器】窗口中,设置你希望通知 Word 文档什么时候自动打开。

建议:在进行下面的操作之前,校对教室电脑的日期和时间

比如,你希望通知 Word 文档在周一至周五的下课时间 08:22 自动打开,那就设置成下面图片这样:

![Create A Trigger](/img/create_an_openning_trigger.png)
![Create A Trigger](/img/create-an-openning-trigger.png)

建议:不要设置成一下课就自动打开班主任的通知 Word 文档,留 2-3 分钟给科任老师留堂
10. **上一步设置的【触发器】可以设置多个!**
Expand All @@ -63,15 +63,15 @@ sidebar_position: 4

12. 在弹出来的【新建操作】窗口中,点击【浏览】

![Create an Operation](/img/create_an_operation.png)
![Create an Operation](/img/create-an-operation.png)

13. 找到在【教室电脑】中的文件夹【`banzhuren-notifier`】中的 `run_minimized` 或者 `run_minimized.bat` 文件,点击【打开】

![open_the_run_minimized_bat](/img/open_the_run_minimized_bat.png)
![open_the_run_minimized_bat](/img/open-the-run-minimized-bat.png)

14. 一路【确定】回到【任务计划程序】界面

![Task Scheduler](/img/task_scheduler.png)
![Task Scheduler](/img/task-scheduler.png)

:::tip 恭喜!

Expand Down
28 changes: 23 additions & 5 deletions docs/tutorial-bat/usage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
slug: usage
description: 班主任使用此工具传递通知的指南
description: 班主任使用此工具【自动】传递通知的指南
sidebar_position: 3
---

Expand All @@ -14,12 +14,30 @@ sidebar_position: 3

注意:通知 Word 文档的名字一定要是 `202x-xx-xx 通知.docx` 完整的格式

:::tip
4. 在当天的通知 Word 文档(如 `2025-01-02 通知.docx`)中填写当天的通知。

其实,现在已经可以通过“命令”电教委员在每个课间打开班主任的通知 Word 文档,实现通知远程的传递了。
![Notice Example](/img/notice-example.png)

:::
:::tip

其实,现在已经可以通过“命令”电教委员在每个课间【手动】打开班主任的通知 Word 文档,实现通知远程的传递了。

:::

## 在班主任电脑上(进阶)

可以将处理通知 Word 文档的共享文件夹,设置为【可编辑】。

:::info

将 Everyone 的【权限级别】设置为【读取/写入】。

:::

通过在线通知 Word 文档,同学们可以远程与班主任沟通,无需往返办公室,尤其避免了上下楼的不便,如:

![Students' Feedback Example](/img/students-feedback-example.png)

## 在教室电脑上

通过 [配置自动打开通知](openning-configuration)[配置自动关闭通知](closing-configuration),能实现通知 Word 文档的自动打开和关闭,就不用麻烦电教委员了。
通过 [配置自动打开通知](openning-configuration)[配置自动关闭通知](closing-configuration),能实现通知 Word 文档的【自动】打开和关闭,就不用麻烦电教委员了。
2 changes: 1 addition & 1 deletion docs/tutorial-feishu-docs/_category_.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"label": "自动搬运家长留言(文档)",
"label": "自动搬运家长留言",
"position": 2,
"link": {
"type": "generated-index",
Expand Down
178 changes: 178 additions & 0 deletions docs/tutorial-feishu-docs/feishu-document-api-configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
---
slug: feishu-document-api-configuration
description: 班主任电脑配置【自动】搬运家长留言的指南。
sidebar_position: 4
---

# 配置自动搬运家长留言

## 在班主任的电脑上

1. 将文件夹【`banzhuren-notifier`】里面 `cofiguration_template.txt` 重命名为 `configuration.txt`
2. 打开 `configuration.txt`
3. 找到并填写如下几个值:

:::warning

暂时请勿修改【已填写】的值,如 `app_id` 和 `app_secret`。

:::

```bash
notice_dir=

document_id=
```

- `notice_dir` 为班主任电脑中,通知 Word 模板 `2025-01-xx 通知.docx` 所在的【绝对路径】

- 您可以打开【我的电脑】,找到通知 Word 模板 `2025-01-xx 通知.docx` 所在的文件夹,直接复制顶上的地址

![获取 notice_dir](/img/copy-notice-dir.png)

- `document_id` 为您的 `家长留言自动通知文档(马冬梅)` 的唯一标识。

- 您需要在浏览器中打开文档,在地址栏中获取文档的 `document_id`。

![获取 document_id](https://sf3-cn.feishucdn.com/obj/open-platform-opendoc/f8dac29d8ea3f01f5a651e0445193213_W0CZqRcbHM.png)

填写完成之后大概长这样:

```bash
notice_dir=D:\Users\Desktop\可编辑文件夹

document_id=Ke6jdf477ohCVVxzANnc56WYnrd
```

4. 按住【win】键,再按【Q】键
5. 搜索【任务计划程序】,打开之后这个东西大概长这样(在下面的图片上按鼠标的【右键】可以放大看):

![Task Scheduler](/img/task-scheduler.png)

6. 点击右边的【创建任务】
7. 在弹出的窗口中,【常规】下面的【名称】随便填
8. 点击【触发器】,点击【新建】

![Create a Task](/img/create-a-task.png)

9. 在弹出的【新建触发器】窗口中,设置你希望家长在 `家长留言自动通知文档(马冬梅)` 中通过【评论】写下的留言,什么时候被自动搬运到当天的班主任通知(如 `2025-01-02 通知.docx`)中。

比如,你希望从每天的 06:30 开始,每隔 30 min 就自动将家长通过【评论】写下的留言,自动搬运到当天的班主任通知中,那就设置成下面图片这样:

![Create a Feishu API Trigger](/img/create-a-feishu-api-trigger.png)

建议:尽量不要设置成和【[自动传递班主任通知——配置自动打开通知](../tutorial-bat/openning-configuration)】中设置的时间冲突,有可能产生意料之外的错误
10. **上一步设置的【触发器】可以设置多个!**

如果您希望在很多个时刻自动搬运家长留言到班主任当天的通知中,就设置很多个对应的【触发器】

11. 设置完【触发器】之后,点击【操作】,点击【新建】

![Operation](/img/operation.png)

12. 在弹出来的【新建操作】窗口中,点击【浏览】

![Create an Operation](/img/create-an-operation.png)

13. 找到在【班主任电脑】中的文件夹【`banzhuren-notifier`】中的 `run_feishu_server_api` 或者 `run_feishu_server_api.bat` 文件,点击【打开】

![Run Feishu Server API](/img/run-feishu-server-api.png)

14. 一路【确定】回到【任务计划程序】界面

![Task Scheduler](/img/task-scheduler.png)

:::tip 恭喜!

理论上,现在班主任的电脑已经可以【自动】根据设置的时间(如每隔 30 min),将家长通过【评论】写下的留言,搬运到班主任当天的通知 Word 文档中(如 `2025-01-02 通知.docx`)了。

:::

:::info

搬运后的家长留言,会在飞书文档的【家长留言区】下面,留下记录,如:

> 2024-11-30 12:34:56【已通知】请 XXX 打电话给家长。
:::

:::tip

班主任【无需】手动每天新建当天的通知 Word 文档。

只要通知 Word 模板 `2025-01-xx 通知.docx` 存在并且上面步骤的设置没出问题,工具能根据【通知 Word 模板】自动新建当天的通知 Word 文档,再自动搬运家长的留言。

:::

:::tip

班主任是 `家长留言自动通知文档(马冬梅)` 的管理员,班主任可以像家长一样使用【评论】进行留言,班主任也可以直接在【家长留言区】下面直接留言。

两种方式的留言,都会被自动搬运到当天的通知 Word 文档之中。

:::

## 在班主任的电脑上(进阶)

### 配置通知 Word 文档的【通知标题】

1. 进入文件夹【`banzhuren-notifier`
2. 打开 `configuration.txt`,您会发现:

```bash
notice_message_heading=通知栏
```

3. 打开飞书文档 `家长留言自动通知文档(马冬梅)`,您会发现:

![Notice Example](/img/notice-example.png)

:::note

没错,`configuration.txt` 里面 `notice_message_heading` 的值,和通知 Word 文档里面的【通知标题】是一样的。

:::

:::warning

如果您不喜欢用“通知栏”这几个字,进行修改的时候,

记得同时改 `configuration.txt` 和 通知 Word 模板 `2025-01-xx 通知.docx`【两个】地方!

:::

### 配置“家长留言自动通知文档”(飞书文档)的【留言标题】

1. 进入文件夹【`banzhuren-notifier`
2. 打开 `configuration.txt`,您会发现:

```bash
message_heading_text=家长留言区
```

3. 打开飞书文档 `家长留言自动通知文档(马冬梅)`,您会发现:

![添加文档应用](/img/add-a-document-application.png)

:::note

没错,`configuration.txt` 里面 `message_heading_text` 的值,和飞书文档里面的一级标题【家长留言区】是一样的。

:::

:::warning

如果您不喜欢用“家长留言区”这几个字,进行修改的时候,

记得同时改 `configuration.txt` 和飞书文档 `家长留言自动通知文档(马冬梅)`【两个】地方!

:::

## 在班主任的手机上(进阶)

1. 班主任已经按上述步骤进行配置。
2. **班主任的电脑开着!**
3. 班主任(不在办公室甚至不在学校)使用手机,通过分享给家长们的链接,访问 `家长留言自动通知文档(马冬梅)`
4. 班主任像家长一样,通过【评论】留下给同学们的通知。工具能自动将班主任的通知留言,抓取到当天的通知 Word 文档之中。
5. 工具根据班主任的配置,自动将当天的通知 Word 文档展示给同学们。
6. 实现超级远距离通知。
Loading

0 comments on commit f2cef86

Please sign in to comment.