Initial commit

This commit is contained in:
James Booth
2013-09-01 16:44:19 +01:00
commit 54417a9ed2
11 changed files with 405 additions and 0 deletions

12
ascii.py Normal file
View File

@@ -0,0 +1,12 @@
import prof
import subprocess
def prof_init(version, status):
prof.register_command("/ascii", 1, 1, "/ascii", "ASCIIfy a message", "ASCIIfy a message.", cmd_ascii)
def cmd_ascii(text):
recipient = prof.get_current_recipient()
if recipient:
proc = subprocess.Popen(['figlet', '--', text], stdout=subprocess.PIPE)
ascii_out = proc.communicate()[0].decode('utf-8')
prof.send_line(u'\u000A' + ascii_out)