fonts - list tdfiglet fonts

This commit is contained in:
Gordon Shumway 2019-04-19 20:32:01 -04:00 committed by GitHub
parent 7bb0de5b91
commit 9201e048a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -763,4 +763,12 @@ class ASCII(callbacks.Plugin):
irc.replySuccess()
cq = wrap(cq)
def fonts(self, irc, msg, args):
"""
List fonts in the tdfiglet font directory.
"""
reply = ", ".join(sorted(os.listdir("/usr/local/share/tdfiglet/fonts/")))
irc.reply(reply, prefixNick=False)
fonts = wrap(fonts)
Class = ASCII