cli.main#

showyourwork.cli.main.cwd_as(path)#

Temporarily change the current working directory to path.

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.main_command(f)#
class showyourwork.cli.main.option_spec(args, kwargs)#

Bases: tuple

Create new instance of option_spec(args, kwargs)

args#

Alias for field number 0

kwargs#

Alias for field number 1

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

Checks whether the repo slug was provided correctly.