def info(environment, opts):
damaged = False<EOL>sites = environment.sites<EOL>if not environment.sites:<EOL><INDENT>sites = []<EOL>damaged = True<EOL><DEDENT>if opts['<STR_LIT>']:<EOL><INDENT>if damaged:<EOL><INDENT>raise DatacatsError('<STR_LIT>')<EOL><DEDENT>for site in sites:<EOL><INDENT>environment.site_name = site<EOL>print('<STR_LIT>'.format(site, environment.web_address()))<EOL><DEDENT>return<EOL><DEDENT>datadir = environment.datadir<EOL>if not environment.data_exists():<EOL><INDENT>datadir = '<STR_LIT>'<EOL><DEDENT>elif damaged:<EOL><INDENT>datadir += '<STR_LIT>'<EOL><DEDENT>print('<STR_LIT>' + environment.name)<EOL>print('<STR_LIT>' + environment.target)<EOL>print('<STR_LIT>' + datadir)<EOL>print('<STR_LIT>' + '<STR_LIT:U+0020>'.join(environment.sites))<EOL>for site in environment.sites:<EOL><INDENT>print()<EOL>environment.site_name = site<EOL>print('<STR_LIT>' + site)<EOL>print('<STR_LIT>' + '<STR_LIT:U+0020>'.join(environment.containers_running()))<EOL>sitedir = environment.sitedir + ('<STR_LIT>' if not environment.data_complete() else '<STR_LIT>')<EOL>print('<STR_LIT>' + sitedir)<EOL>addr = environment.web_address()<EOL>if addr:<EOL><INDENT>print('<STR_LIT>' + addr)<EOL><DEDENT><DEDENT>
Display information about environment and running containers

Usage:
  datacats info [-qr] [ENVIRONMENT]

Options:
  -q --quiet         Echo only the web URL or nothing if not running

ENVIRONMENT may be an environment name or a path to an environment directory.
Default: '.'