Skip to content
This repository has been archived by the owner on Apr 13, 2018. It is now read-only.

Reminder #43

Merged
merged 3 commits into from
Sep 14, 2017
Merged

Reminder #43

merged 3 commits into from
Sep 14, 2017

Conversation

yunxiyinzhe
Copy link
Contributor

1.之前local模式的bug有个修复,然而修复错了
2.日程提醒使用Emotibot提取出日程,利用 TaskWarrior 来创建和查询任务。如#28所述。TaskWarrior 版本需要2.5以上

@wzpan
Copy link
Owner

wzpan commented Sep 14, 2017

我有两个争议:

  1. 成功创建提醒后没有任何提示吗?
  2. 这一句话是否考虑使用其他对话机器人的情况?如果使用图灵机器人,程序会否奔溃?
if jsondata.get('data')[0]['cmd'] == 'reminder':

@yunxiyinzhe
Copy link
Contributor Author

1.有提示,创建成功会语音提示类似:“叮当会在2017年9月4日 周一 09:00提醒你吃饭",创建失败会提示:“创建提醒失败了”

2.只有配置了Emotibot才会走到这个逻辑,如果配置图灵机器人,Notifier.py line 36-37也有判断

@wzpan wzpan merged commit 77a71e4 into wzpan:master Sep 14, 2017
wzpan pushed a commit that referenced this pull request Sep 14, 2017
* 修复local模式下,Mic类某些变量未定义的问题

* 新增日程提醒功能

* 修复flake8检查的错误

Conflicts:
	client/local_mic.py
@wzpan
Copy link
Owner

wzpan commented Sep 14, 2017

测试了一下:

  • 我:5分钟后提醒我睡觉
  • 叮当:提醒睡觉……您创建的时间好像不对,您可以说明天早上8点提醒我吃饭
  • 我:明天早上0点01分提醒我睡觉
  • 叮当:提醒睡觉,好的。请问您要什么时候提醒你呢?
  • 我:明天早上0点01分
  • 叮当:(又问了一遍)好的。请问您要什么时候提醒你呢?
  • 我:明天早上0点01分
  • 叮当:创建提醒失败

@yunxiyinzhe
Copy link
Contributor Author

这是Emotibot的限制,想让他成功返回reminder结果,一般要把提醒的时间距离当前长一点,而且即使这样有时候也不能成功返回。我记得说:“10分钟后提醒我睡觉” 是可以的。
总之想让Emotibot成功返回正确的reminder并不容易,对句子有一定的要求。

@wzpan
Copy link
Owner

wzpan commented Sep 14, 2017

我感觉是 TaskWarrior 的命令不对。

~ task add 吃饭 due:"2017-09-16T08:00:00"
Created task 2.
➜  ~ task list

ID Age  Due        Description Urg 
 1 4min 2017-09-16 吃饭         8.2

这里的 08:00:00 不该列入紧急程度(Urg),而是放进 Due。但不知道怎么做。

@yunxiyinzhe
Copy link
Contributor Author

TaskWarrior 要用源码编译,不能用apt-get install,自带的版本太老,功能太弱。
08:00:00 没有列入紧急程度,自带版本通过命令task 1 查看任务状态,不能得到小时:分钟:秒,2.5后的版本可以。

@wzpan
Copy link
Owner

wzpan commented Sep 16, 2017

@yunxiyinzhe 2.5.0 有问题。但 2.5.1 可以了。已更新 wiki 。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants