How to use the lookatme.utils.spec_from_style function in lookatme

To help you get started, we’ve selected a few lookatme examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github d0c-s4vage / lookatme / lookatme / tui.py View on Github external
def update_slide_num(self):
        """Update the slide number
        """
        slide_text = "slide {} / {}".format(
            self.curr_slide.number + 1,
            len(self.pres.slides),
        )
        date = self.pres.meta.get('date', '')
        spec = spec_from_style(config.STYLE["slides"])
        self.slide_num.set_text([(spec, slide_text)])
github d0c-s4vage / lookatme / lookatme / tui.py View on Github external
def update_creation(self):
        """Update the author and date
        """
        author = self.pres.meta.get('author', '')
        author_spec = spec_from_style(config.STYLE["author"])

        date = self.pres.meta.get('date', '')
        date_spec = spec_from_style(config.STYLE["date"])

        self.creation.set_text([
            (author_spec, f"  {author} "),
            (date_spec, f" {date} "),
        ])
github d0c-s4vage / lookatme / lookatme / tui.py View on Github external
def text(style, data, align="left"):
    if isinstance(style, dict):
        style = spec_from_style(style)
    return urwid.Text((style, data), align=align)
github d0c-s4vage / lookatme / lookatme / tui.py View on Github external
def update_title(self):
        """Update the title
        """
        title = self.pres.meta.get("title", "")
        spec = spec_from_style(config.STYLE["title"])
        self.slide_title.set_text([(spec, f" {title} ")])