Example #1
0
def print_warning(text):
    from utils import colors
    from utils.glyphs import ESCLAMATION
    from segments.basics import Divider

    divider = Divider()
    cross_rendered = '{}{} {}{}{}{}'.format(
        colors.background(colors.GOLD),
        ESCLAMATION,
        colors.reset(),
        colors.foreground(colors.GOLD),
        divider.text if divider.active else '',
        colors.reset()
    )

    text_rendered = '{}{}promptastic{}: {}{}\n'.format(
        colors.foreground(colors.LIGHTER_GOLD),
        colors.underline_start(),
        colors.underline_end(),
        text,
        colors.reset()
    )

    output = '{} {}'.format(cross_rendered, text_rendered)
    print_raw(output)
Example #2
0
 def render(self):
     output = list()
     output.append(self.bg)
     output.append(self.fg)
     output.append(self.text)
     output.append(colors.reset() if self.bg or self.fg else '')
     return ''.join(output)
Example #3
0
 def render(self):
     output = list()
     output.append(self.bg)
     output.append(self.fg)
     output.append(self.text)
     output.append(colors.reset() if self.bg or self.fg else '')
     return ''.join(output)
Example #4
0
def print_warning(text):
    from utils import colors
    from utils.glyphs import ESCLAMATION
    from segments.basics import Divider

    divider = Divider()
    cross_rendered = '{}{} {}{}{}{}'.format(
        colors.background(colors.GOLD), ESCLAMATION, colors.reset(),
        colors.foreground(colors.GOLD), divider.text if divider.active else '',
        colors.reset())

    text_rendered = '{}{}promptastic{}: {}{}\n'.format(
        colors.foreground(colors.LIGHTER_GOLD), colors.underline_start(),
        colors.underline_end(), text, colors.reset())

    output = '{} {}'.format(cross_rendered, text_rendered)
    print_raw(output)