ASCII — Ascii art database & spammer

Prints ascii art to the channel

Setup

Place .txt files in datadir/ASCII/. The file names must end in .txt and can contain alphanumerics, underscores, and dashes. They must be UTF-8 decodable but will otherwise be transmitted verbatim.

Commands

.listascii

List available ascii arts.

.ascii <name>

Begin printing the named ascii art

.stopascii

Stop the currently running ascii art

Class Reference

class pyircbot.modules.ASCII.ASCII(bot, moduleName)[source]

Bases: pyircbot.modulebase.ModuleBase

channel_busy(channel_name)[source]

Prevent parallel spamming in same channel

cmd_ascii(msg, cmd)[source]
cmd_asciiedit(msg, cmd)[source]
cmd_listascii(msg, cmd)[source]

List available asciis

cmd_stopascii(msg, cmd)[source]

Command to stop the running ascii in a given channel

edit_ascii(lines, info_dict)[source]
load_ascii(ascii_name)[source]

Loads contents of ascii from disk by name :return: list of string lines

print_lines(channel, lines, prefix=None)[source]

Print the contents of ascii_path to channel :param ascii_path: file path to the ascii art file to read and print :param channel: channel name to print to

send_to_channel(channel, lines, **kwargs)[source]
class pyircbot.modules.ASCII.AsciiEdit(lines)[source]

Bases: object

Semi-smart ascii editing library

getlines()[source]

Return the rendered ascii, formatted as a list of string lines

goto(x, y)[source]

This method moves the internal pointer to the passed X and Y coordinate. The origin is the top left corner. The literal coordinates (self.x and self.y) point to where in the data the pointer is. Y is simple, self.y is always the data and rendered Y coordinate. X has invisible-when-rendered formatting data, so the self.virtual_x attribute tracks where the cursor is in the rendered output; self.x tracks the location in the actual data. :param x: x coordinate :type x: int :param y: y coordinate :type y: int

set_charcolor(color)[source]
write(text)[source]

Write a single line of text to the ascii

pyircbot.modules.ASCII.is_numeric(char)[source]