Created
May 7, 2014 23:52
-
-
Save qpfiffer/62562d005e2de7c8d4df to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import weechat as wc | |
import os,commands | |
from datetime import date | |
wc.register("imply","pepperouni","1.0","GPL3","Greentext it!","","") | |
def imply(data, buffer, args): | |
entry = args | |
'''Multimply''' | |
x = entry.rfind("#") | |
if (x!=-1): | |
imply(data,buffer,entry[0:x]) | |
entry = entry[x+1:len(entry)] | |
'''Flags''' | |
entry=entry.replace("%y",str(date.today().year)) | |
entry=entry.replace("%ay",str(date.today().year)+" Anno Domini") | |
whole="3>"+entry | |
wc.command(wc.current_buffer(), whole) | |
return wc.WEECHAT_RC_OK | |
wc.hook_command("imply", "IMPLYING", "","", "", "imply", "") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment