搭配俏皮话和其他俏皮话
helga-quip的Python项目详细描述
“总是用机智的反驳,那个” -引用一位英明的澳洲人的话 胡说八道
目的
搭配俏皮话和其他俏皮话。它注意到双关语,夸张, 隐喻和其他比喻。
用法
俏皮话可能被用来做一句俏皮话或是精心设计你妈妈,或者她就是这么说的。 笑话。语法为:
!quip add <quip_regex> <quip_kind>
俏皮话是一种你想要回应的俏皮话,可以是模板 回应。可能只是“你妈妈”或者“她就是这么说的”,但是用户 可能希望在响应中包含匹配的正则表达式。这可以用 {0},将替换为匹配的组。其他位置可能是 现在支持已使用或命名的组,类似于p<;名称>;表达式)。
quip_regex是要匹配的搜索正则表达式。任何正则表达式都应该 做,就像“听起来很难”。搜索不区分大小写。 如果有多个匹配项,将选择一个随机响应。
示例:
!quip add "(it|that|this) (sounds|is|was) really hard" "thats what she said" <unwitting user>: i took this test last night, and it was really hard <bot>: thats what she said <unwitting user>: aww bot, your wit knows no bounds! ha ha!
示例2:
!quip add "(looks|is) really (leet|fat|awesome)" "your mom {0} really {1}" <irc noob>: huh this game looks really awesome <bot>: your mom looks really awesome <irc noob>: oh bot! you and the jokes, they keep coming so hard!
示例3(命名的backreferences):
!quip add "(?:(?:i|he|you) (?:is|am)) (?P<action>excited|giddy)" "your mom is {action}" <foolish scrub>: man, i am excited for the concert! <bot>: your mom is excited <foolish scrub>: YOUR MOM IS... <foolish scrub> has left the chat
示例4(位置):
!quip add "[am|is] (lord|king) of (me|him|her|she|he)" "your mom is {0} of {1}" <naive user>: ...man, i am lord of him! shot right in the face, and he wasn't doing nothin'! <bot>: your mom is lord of him <naive user> sobs at the truth of it all
!quip dump
使用“regex”“kind”条目转储到粘贴服务dpaste
许可证
版权所有(c)2016 Jon Robison
有关许可信息,请参见附带的许可证