@add_handler('help')
def qute_help(url):
 try:
  utils.read_file('html/doc/index.html')
 except OSError:
  html = jinja.render('error.html', title='Error while loading documentation', url=url.toDisplayString(), error="This most likely means the documentation was not generated properly. If you are running qutebrowser from the git repository, please run scripts/asciidoc2html.py. If you're running a released version this is a bug, please use :report to report it.", icon='')
  return ('text/html', html)
 urlpath = url.path()
 if ((not urlpath) or (urlpath == '/')):
  urlpath = 'index.html'
 else:
  urlpath = urlpath.lstrip('/')
 if (not docutils.docs_up_to_date(urlpath)):
  message.error('Your documentation is outdated! Please re-run scripts/asciidoc2html.py.')
 path = 'html/doc/{}'.format(urlpath)
 if urlpath.endswith('.png'):
  return ('image/png', utils.read_file(path, binary=True))
 else:
  data = utils.read_file(path)
  return ('text/html', data)

@ add_handler ( 'help' ) def qute_help ( url ) : try : utils . read_file ( 'html/doc/index.html' ) except OSError : html = jinja . render ( 'error.html' , title = 'Error while loading documentation' , url = url . toDisplayString ( ) , error = "This most likely means the documentation was not generated properly. If you are running qutebrowser from the git repository, please run scripts/asciidoc2html.py. If you're running a released version this is a bug, please use :report to report it." , icon = '' ) return ( 'text/html' , html ) urlpath = url . path ( ) if ( ( not urlpath ) or ( urlpath == '/' ) ) : urlpath = 'index.html' else : urlpath = urlpath . lstrip ( '/' ) if ( not docutils . docs_up_to_date ( urlpath ) ) : message . error ( 'Your documentation is outdated! Please re-run scripts/asciidoc2html.py.' ) path = 'html/doc/{}' . format ( urlpath ) if urlpath . endswith ( '.png' ) : return ( 'image/png' , utils . read_file ( path , binary = True ) ) else : data = utils . read_file ( path ) return ( 'text/html' , data )
handler for qute:help .