Python pyfiglet.Figlet() Examples
The following are 24
code examples of pyfiglet.Figlet().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
pyfiglet
, or try the search function
.
Example #1
Source File: carpa.py From circo with MIT License | 6 votes |
def parsingopt(): """ Parsing and help function """ fig = Figlet(font='standard') print(fig.renderText('CARPA')) print('Author: ' + __author__) print('Version: ' + __version__ + '\n') parser = argparse.ArgumentParser() parser.add_argument('-v', '--verbose', action='store_true', help='Enable Debugging') parser.add_argument('-p', metavar='<plugin.ini>', dest='pluginfd', help='Plugin File (faraday.ini)') parser.add_argument('-i', required=True, metavar='<eth0>', dest='nic', help='Sniff Interface') parser.add_argument('-f', required=True, metavar='<file>', dest='fd', help='Output File') if len(sys.argv) > 1: try: return parser.parse_args() except IOError, msg: parser.error(str(msg))
Example #2
Source File: jaula_chip.py From circo with MIT License | 6 votes |
def parsingopt(): f = Figlet(font='standard') print(f.renderText('JAULA')) print('Author: ' + __author__) print('Version: ' + __version__ + '\n') parser = argparse.ArgumentParser(add_help=True) parser.add_argument('-v', '--verbose', action='store_true', help='Enable debugging') parser.add_argument('-i', required=True, metavar='<wlan1>', dest='wnic', help='wlan int') parser.add_argument('-f', required=True, metavar='<file>', dest='fd', help='Output file') if len(sys.argv) > 1: try: return parser.parse_args() except IOError, msg: parser.error(str(msg))
Example #3
Source File: jaula_rpz.py From circo with MIT License | 6 votes |
def parsingopt(): f = Figlet(font='standard') print(f.renderText('JAULA')) print('Author: ' + __author__) print('Version: ' + __version__ + '\n') parser = argparse.ArgumentParser(add_help=True) parser.add_argument('-v', '--verbose', action='store_true', help='Enable debugging') parser.add_argument('-i', required=True, metavar='<wlan1>', dest='wnic', help='wlan int') parser.add_argument('-f', required=True, metavar='<file>', dest='fd', help='Output file') if len(sys.argv) > 1: try: return parser.parse_args() except IOError, msg: parser.error(str(msg))
Example #4
Source File: mock.py From modules-repo with GNU Affero General Public License v3.0 | 6 votes |
def figletcmd(self, message): """.figlet <font> <text>""" # We can't localise figlet due to a lack of fonts args = utils.get_args(message) if len(args) < 2: await utils.answer(message, self.strings["figlet_args"]) return text = " ".join(args[1:]) mode = args[0] if mode == "random": mode = random.choice(FigletFont.getFonts()) try: fig = Figlet(font=mode, width=30) except FontNotFound: await utils.answer(message, self.strings["no_font"]) return await message.edit("<code>\u206a" + utils.escape_html(fig.renderText(text)) + "</code>")
Example #5
Source File: dingoes.py From dingoes with MIT License | 5 votes |
def print_banner(): """Print welcome banner """ figlet = Figlet(font='slant') banner = figlet.renderText('DiNgoeS') print(banner) print("[+] 2017 CryptoAUSTRALIA - https://cryptoaustralia.org.au\n")
Example #6
Source File: renderers.py From asciimatics with Apache License 2.0 | 5 votes |
def __init__(self, text, font=DEFAULT_FONT, width=200): """ :param text: The text string to convert with Figlet. :param font: The Figlet font to use (optional). :param width: The maximum width for this text in characters. """ super(FigletText, self).__init__() self._images = [Figlet(font=font, width=width).renderText(text)]
Example #7
Source File: gitgud.py From git-gud with The Unlicense | 5 votes |
def fig(text): fig = pyfiglet.Figlet() return fig.renderText(text)
Example #8
Source File: logo.py From pyattck with MIT License | 5 votes |
def __check_for_logo(self, actor_name): if os.path.exists('{}/{}.png'.format(self.__DATA_PATH, actor_name)): self.convert_image('{}/{}.png'.format(self.__DATA_PATH, actor_name)) self.image_path = os.path.abspath('{}/{}.png'.format(self.__DATA_PATH, actor_name)) else: custom_fig = Figlet(font='graffiti') self.__image = custom_fig.renderText(actor_name)
Example #9
Source File: display.py From pyShelf with GNU General Public License v3.0 | 5 votes |
def banner_render(self): title = pyfiglet.Figlet(font="cyberlarge") _banner = ( title.renderText("pyShelf") + "\nversion " + self.version + " " + self.slogan + "\n" ) return _banner
Example #10
Source File: display.py From pyShelf with GNU General Public License v3.0 | 5 votes |
def banner(self): self.h_rule() title = pyfiglet.Figlet(font="cyberlarge") print(self.green + title.renderText("pyShelf") + self.clr_term) print( self.blue + " version " + self.version + self.clr_term + " " + self.slogan ) self.h_rule() print()
Example #11
Source File: framework.py From Learning-Python-for-Forensics-Second-Edition with MIT License | 5 votes |
def run(self): msg = 'Initializing framework' print('[+]', msg) self.log.info(msg) f = Figlet(font='doom') print(f.renderText('Framework')) self.log.debug('System ' + sys.platform) self.log.debug('Version ' + sys.version) if not os.path.exists(self.output): os.makedirs(self.output) self._list_files() self._run_plugins()
Example #12
Source File: framework.py From Learning-Python-for-Forensics-Second-Edition with MIT License | 5 votes |
def run(self): msg = 'Initializing framework' print('[+]', msg) self.log.info(msg) f = Figlet(font='doom') print(f.renderText('Framework')) self.log.debug('System ' + sys.platform) self.log.debug('Version ' + sys.version) if not os.path.exists(self.output): os.makedirs(self.output) self._list_files() self._run_plugins()
Example #13
Source File: ascii.py From SML-Cogs with MIT License | 5 votes |
def figletrandom(self, ctx: Context, text: str): """Convert text to ascii art using random font.""" font = random.choice(FigletFont.getFonts()) f = Figlet(font=font) out = f.renderText(text) for page in pagify(out, shorten_by=24): await self.bot.say(box(page)) await self.bot.say("Font: {}".format(font))
Example #14
Source File: ascii.py From SML-Cogs with MIT License | 5 votes |
def figlet(self, ctx: Context, text: str, font=None): """Convert text to ascii art.""" if font is None: font = 'slant' if font == 'random': fonts = FigletFont.getFonts() font = random.choice(fonts) f = Figlet(font=font) out = f.renderText(text) for page in pagify(out, shorten_by=24): await self.bot.say(box(page))
Example #15
Source File: figlet.py From SML-Cogs with MIT License | 5 votes |
def figletrandom(self, ctx: Context, text: str): """Convert text to ascii art using random font.""" font = random.choice(FigletFont.getFonts()) f = Figlet(font=font) out = f.renderText(text) for page in pagify(out, shorten_by=24): await self.bot.say(box(page)) await self.bot.say("Font: {}".format(font))
Example #16
Source File: figlet.py From SML-Cogs with MIT License | 5 votes |
def figlet(self, ctx: Context, text: str, font=None): """Convert text to ascii art.""" if font is None: font = 'slant' if font == 'random': fonts = FigletFont.getFonts() font = random.choice(fonts) f = Figlet(font=font) out = f.renderText(text) for page in pagify(out, shorten_by=24): await self.bot.say(box(page))
Example #17
Source File: main.py From text2art with MIT License | 5 votes |
def gt(text, font=DEFAULT_FONT, color="magenta", on_color=None, attr=None, width=80, justify="center"): """An art font that generates the effect of the specified parameter. Args: text: Get an character string. on_color: Get an character string,setting the background color of the text. available text highlights: on_red, on_green, on_yellow, on_blue, on_magenta, on_cyan, on_white. attr: Get a character string,setting the effect of the text. available attributes: bold, dark, underline, blink, reverse, concealed. width: Setting the size of the terminal output font, type is int. justify: Setting the location of the terminal output font. available parameter: left, enter, right. Returns: A text of a specific color effect. """ f = Figlet( font, width=width, justify=justify ) r = f.renderText(text) return colored(r, color, on_color, attr)
Example #18
Source File: main.py From text2art with MIT License | 5 votes |
def rd(text, on_color=None, attr=None, width=80, justify="center"): """An art font that generates random fonts and random colors. Args: text: Get an character string. color: Get a color string,dye the input string with the corresponding color. available text colors: red, green, yellow, blue, magenta, cyan, white. on_color: Get an character string,setting the background color of the text. available text highlights: on_red, on_green, on_yellow, on_blue, on_magenta, on_cyan, on_white. attr: Get a character string,setting the effect of the text. available attributes: bold, dark, underline, blink, reverse, concealed. width: Setting the terminal width of the output font, type is int. justify: Setting the location of the terminal output font. available parameter: left, enter, right. Returns: A text of a specific color effect. """ rand_int = random.randint(1, len(font_list)+1) rand_color = color_dict.get(random.randint(30, 38)) rand_font = font_list[rand_int] print("Random font is :{}".format(rand_font)) f = Figlet( font=rand_font, width=width, justify=justify ) r = f.renderText(text) return colored(r, rand_color, on_color, attr)
Example #19
Source File: test.py From MARA_Framework with GNU Lesser General Public License v3.0 | 5 votes |
def banner(text): cprint(Figlet().renderText(text), "blue")
Example #20
Source File: test.py From MARA_Framework with GNU Lesser General Public License v3.0 | 5 votes |
def __init__(self, opts): self.opts = opts self.ok = 0 self.fail = 0 self.failed = [] self.oked = [] self.skip = ['runic','pyramid','eftifont'] # known bug.. self.f = Figlet()
Example #21
Source File: twent.py From twent with MIT License | 5 votes |
def time_now(): ''' Return current time in Figlet format. ''' time_heading = '===============Time===============\n' now = datetime.datetime.now().strftime("%H:%M") f = Figlet(font='doom') time_details = f.renderText(now).rstrip() + '\n' return (time_heading + time_details).decode('utf-8')
Example #22
Source File: dongerdong.py From dongerdong with GNU General Public License v3.0 | 5 votes |
def ascii(self, key, font='smslant', lineformat=""): try: if not config['show-ascii-art-text']: await self.message(self.channel, key) return '' except KeyError: logging.warning("Plz set the show-ascii-art-text config. kthx") try: lines = [lineformat + name for name in Figlet(font).renderText(key).split("\n")[:-1] if name.strip()] except: # We're looking to catch any "pyfiglet.FontNotFound" exceptions logging.error("You need to install extra fonts from http://www.jave.de/figlet/fonts.html by downloading the zipfile and then running pyfiglet -L <NameOfZipFile>") await self.message(self.channel, key) return '' await self.message(self.channel, "\n".join(lines))
Example #23
Source File: __main__.py From whatsapp-play with MIT License | 5 votes |
def print_logo(text_logo): figlet = Figlet(font='slant') print(figlet.renderText(text_logo)) # parse positional and optional arguments
Example #24
Source File: circo.py From circo with MIT License | 5 votes |
def parsingopt(): f = Figlet(font='standard') print(f.renderText('CIRCO')) print('Author: ' + __author__) print('Version: ' + __version__ + '\n') parser = argparse.ArgumentParser(add_help=True) command_group_mode = parser.add_mutually_exclusive_group(required=True) parser.add_argument('-v', '--verbose', action='store_true', help='Enable debugging') command_group_mode.add_argument('-i', dest='nic', metavar='<eth0>', help='Single Mode: <eth0>') command_group_mode.add_argument('-b', '--bridge', action='store_true', help='Bridge Mode: Use eth0 & eth1') parser.add_argument('-A', '--ALL', action='store_true', help='All exfiltration except wifi') parser.add_argument('-p', '--ping', action='store_true', help='PING exfiltration') parser.add_argument('-t', '--trace', action='store_true', help='Traceroute exfiltration') parser.add_argument('-d', '--dns', action='store_true', help='DNS exfiltration') parser.add_argument('-w', '--web', action='store_true', help='HTTP exfiltration') parser.add_argument('-s', '--ssl', action='store_true', help='HTTPS exfiltration') parser.add_argument('-x', '--prx', action='store_true', help='Proxy exfiltration') parser.add_argument('-n', '--ntp', action='store_true', help='NTP exfiltration') parser.add_argument('-a', dest='wnic', metavar='<wlan1>', help='Wireles exfiltration') if len(sys.argv) > 1: try: return parser.parse_args() except IOError, msg: parser.error(str(msg))