cli.main#

showyourwork.cli.main.echo(text='', **kwargs)#

Print a message to the terminal with some custom formatting.

Breaks long lines using TextWrapper and adds custom colors and indentation to code snippets and environment variables.

This may just be the ugliest function I’ve ever written in my life.

Parameters
  • text (str) – The text to print.

  • kwargs – Additional keyword arguments to pass to click.echo.

showyourwork.cli.main.ensure_top_level()#

Ensures we’re running commands in the top level of a git repo.

Raises

exceptions.ShowyourworkException – If not in the top level of a git repo.

showyourwork.cli.main.validate_slug(context, param, slug)#

Checks whether the repo slug was provided correctly.