Skip to content

Commit

Permalink
User paid to block list a word
Browse files Browse the repository at this point in the history
  • Loading branch information
polyrabbit committed Aug 29, 2023
1 parent 263a3e8 commit 0732666
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions WeCron/wxhook/management/commands/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def handle(self, *args, **options):
{"name": "亲友团", "sub_button": [
{"type": "view", "name": "\U0001F60A意见反馈", "url": "https://www.wjx.top/jq/15914889.aspx"},
{"type": "view", "name": "©源代码", "url": "https:/polyrabbit/WeCron"},
{"type": "view", "name": "📰 Hacker News", "url": "https://hackernews.betacat.io/zh.html?utm_source=wecron"},
{"type": "view", "name": "RaaS", "url": "https:/polyrabbit/WeCron/blob/master/WeCron/remind/static/docs/raas.md"},
# {"type": "click", "name": "小密圈", "key": "join_group"},
# {"type": "click", "name": "作者微信", "key": "add_friend"},
Expand Down
7 changes: 7 additions & 0 deletions WeCron/wxhook/tests/test_todo_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,13 @@ def test_parse_repeat_day(self):
self.assertEquals(reminder.time.hour, 20)
self.assertEquals(reminder.time.minute, 0)

def test_parse_ignored_words(self):
text = '明早10点中意'
reminder = self.parse(text)
self.assertEqual(reminder.desc, text)
self.assertEqual(reminder.title(), '中意')
self.assertEquals(reminder.time.hour, 10)

def test_parse_repeat_day_with_implict_afternoon(self):
text = '每天七点半提醒我起床'
reminder = self.parse(text)
Expand Down
3 changes: 2 additions & 1 deletion WeCron/wxhook/todo_parser/ignore_words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
每分
每分钟
每天晚上
点收
点收
点中

0 comments on commit 0732666

Please sign in to comment.