Skip to content

Instantly share code, notes, and snippets.

@qpfiffer
Created May 7, 2014 23:52
Show Gist options
  • Save qpfiffer/62562d005e2de7c8d4df to your computer and use it in GitHub Desktop.
Save qpfiffer/62562d005e2de7c8d4df to your computer and use it in GitHub Desktop.
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