This file contains 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
[Core] | |
Name = HipchatEx | |
Module = hipchatex | |
[Documentation] | |
Description = This is my customized hipchat backend. |
This file contains 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
from errbot import BotPlugin, botcmd | |
from os.path import join | |
DAYS_PATH = 'f:/errplugins/' | |
class School(BotPlugin): | |
@botcmd | |
def missed_day(self, msg, args): | |
"""Get missed day and provide assignment summary.""" | |
with open(join(DAYS_PATH, "summary.%s" % args), 'r') as f: |
This file contains 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
from errbot import BotPlugin, botcmd | |
from pyfiglet import Figlet | |
class AsciiArt(BotPlugin): | |
@botcmd | |
def big(self, mess, args): | |
return "```\n" + Figlet(font='slant').renderText(args) + "\n```" |
This file contains 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
[Core] | |
Name = AsciiArt | |
Module = asciiart | |
[Documentation] | |
Description = Make what you say big ! | |
[Python] | |
Version = 3 |
This file contains 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
from errbot import BotPlugin, botcmd | |
class AsciiArt(BotPlugin): | |
""" Ascii Art related commands. """ | |
@botcmd | |
def big(self, mess, args): | |
""" Generates a big version of what you want to say.""" | |
return args.upper() |
This file contains 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
from errbot import BotPlugin, botcmd | |
from pyfiglet import Figlet | |
class AsciiArt(BotPlugin): | |
""" Ascii Art related commands. """ | |
@botcmd(template='biginfo') | |
def big(self, mess, args): | |
""" Generates a big version of what you want to say.""" | |
return {'small': args, 'big': Figlet(font='slant').renderText(args)} |
This file contains 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
from errbot import BotPlugin, botcmd | |
from pyfiglet import Figlet, FigletFont | |
class AsciiArt(BotPlugin): | |
""" Ascii Art related commands. """ | |
@botcmd(split_args_with=' ') | |
def big(self, mess, args): | |
""" Generates a big version of what you want to say.""" | |
fonts = FigletFont.getFonts() | |
if len(args) <= 1 or args[0] not in fonts: |
This file contains 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 random, time | |
from errbot import BotPlugin, botcmd | |
from pyfiglet import Figlet, FigletFont | |
class AsciiArt(BotPlugin): | |
""" Ascii Art related commands. """ | |
@botcmd | |
def big(self, mess, args): | |
""" Generates 3 big versions with a random font.""" | |
for font in random.sample(FigletFont.getFonts(), 3) |
This file contains 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
from datetime import datetime | |
from errbot import BotPlugin, botcmd | |
from pyfiglet import Figlet, FigletFont | |
class AsciiArt(BotPlugin): | |
""" Ascii Art related commands. """ | |
def activate(self): | |
super().activate() | |
self.start_poller(60, self.talking_clock) # callbacks every minute |
This file contains 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
from errbot import BotPlugin, botcmd | |
from pyfiglet import Figlet | |
class AsciiArt(BotPlugin): | |
""" Ascii Art related commands. """ | |
@webhook | |
def alert(self, request): | |
msg = request['msg'] | |
self.send('gbin', "```\n" + Figlet().renderText('ALERT') + "\n```\n" + msg) |
OlderNewer