def build_help(self): print bold("Sphinx v%s" % sphinx.__version__) print "Please use `make %s' where %s is one of" % ( (blue('target'), ) * 2) for osname, bname, description in BUILDERS: if not osname or os.name == osname: print ' %s %s' % (blue(bname.ljust(10)), description)
def build_help(self): # type: () -> None print(bold("Sphinx v%s" % sphinx.__display_version__)) print("Please use `make %s' where %s is one of" % ((blue('target'),) * 2)) # type: ignore # NOQA for osname, bname, description in BUILDERS: if not osname or os.name == osname: print(' %s %s' % (blue(bname.ljust(10)), description))
def build_help(self): # type: () -> None print(bold("Sphinx v%s" % sphinx.__display_version__)) print("Please use `make %s' where %s is one of" % ((blue('target'),)*2)) # type: ignore # NOQA for osname, bname, description in BUILDERS: if not osname or os.name == osname: print(' %s %s' % (blue(bname.ljust(10)), description))
def run_js_extensions(app, docname, source_list): """ Lets all registered Node.js extensions to process given document source Executed for each document after the source gets read. Sequentially feeds stdin of each registered Node.js with the source and continues with whatever the extension sends to stdout. The extensions are provided with the document name as the first CLI argument. Hercule (https://www.npmjs.com/package/hercule) is built-in as if it was the first Node.js extension in the pipeline. """ source = source_list[0] app.verbose( console.bold("runnning JavaScript extension 'hercule'... ") + console.blue(docname)) command = [ node_bin, os.path.join(node_modules_bin_dir, 'hercule'), '--relative=' + docs_dir, '--stdin' ] source = run_extension('hercule', command, source) for basename, command in js_extensions: app.verbose( console.bold("runnning JavaScript extension '{}'... ".format( basename)) + console.blue(docname)) source = run_extension(basename, command + [docname], source) source_list[0] = source
def build_help(self) -> None: if not color_terminal(): nocolor() print(bold("Sphinx v%s" % sphinx.__display_version__)) print("Please use `make %s' where %s is one of" % ((blue('target'),) * 2)) for osname, bname, description in BUILDERS: if not osname or os.name == osname: print(' %s %s' % (blue(bname.ljust(10)), description))
def env_get_outdated_hook(app, env, added, changed, removed): rval = set() if not hasattr(env, 'argparse_usages'): return [] for usage in env.argparse_usages: docname = usage['docname'] dep_file = usage['dependency_file'] dep_mtime = usage['dependency_mtime'] current_mtime = os.stat(dep_file).st_mtime if current_mtime > dep_mtime and docname not in removed: rval.add(docname) for docname in rval: from sphinx.util.console import blue msg = blue('found outdated argparse doc: {0}'.format(docname)) app.builder.info(msg) return list(rval)
def build_help(self): print bold("Sphinx v%s" % sphinx.__version__) print "Please use `make %s' where %s is one of" % ((blue('target'),)*2) for osname, bname, description in BUILDERS: if not osname or os.name == osname: print ' %s %s' % (blue(bname.ljust(10)), description)
def build_help(self): print(bold("Sphinx v%s" % sphinx.__display_version__)) print("Please use `make %s' where %s is one of" % ((blue("target"),) * 2)) for osname, bname, description in BUILDERS: if not osname or os.name == osname: print(" %s %s" % (blue(bname.ljust(10)), description))
def info(msg): """Use Sphinx builder to output a console message.""" global App from sphinx.util.console import blue App.builder.info(blue(msg))