Render HTML for using the package's output file.

        Subclasses can override this method to provide custom behavior for
        rendering the output file.
771596
def render_compressed_output(self, package, package_name, package_type):
        
        method = getattr(self, 'render_{0}'.format(package_type))

        return method(package, package.output_filename)
816890
protected void generatePackageTreeFile() throws IOException {
        HtmlTree body = getPackageTreeHeader();
        HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
                ? HtmlTree.MAIN()
                : body;
        Content headContent = getResource("doclet.Hierarchy_For_Package",
                utils.getPackageName(packagedoc));
        Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, false,
                HtmlStyle.title, headContent);
        Content div = HtmlTree.DIV(HtmlStyle.header, heading);
        if (configuration.packages.size() > 1) {
            addLinkToMainTree(div);
        }
        htmlTree.addContent(div);
        HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
        divTree.addStyle(HtmlStyle.contentContainer);
        addTree(classtree.baseclasses(), "doclet.Class_Hierarchy", divTree);
        addTree(classtree.baseinterfaces(), "doclet.Interface_Hierarchy", divTree);
        addTree(classtree.baseAnnotationTypes(), "doclet.Annotation_Type_Hierarchy", divTree);
        addTree(classtree.baseEnums(), "doclet.Enum_Hierarchy", divTree);
        htmlTree.addContent(divTree);
        if (configuration.allowTag(HtmlTag.MAIN)) {
            body.addContent(htmlTree);
        }
        HtmlTree tree = (configuration.allowTag(HtmlTag.FOOTER))
                ? HtmlTree.FOOTER()
                : body;
        addNavLinks(false, tree);
        addBottom(tree);
        if (configuration.allowTag(HtmlTag.FOOTER)) {
            body.addContent(tree);
        }
        printHtmlDocument(null, true, body);
    }
1237368
function render()
    {
        if (!isset($this->result)) {
            $this->usageError('Nothing to render!');
        }

        $baseViewFilePath = dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'views';

        if (!empty($_SERVER['argv'])) {
            $viewFilename = $baseViewFilePath.DIRECTORY_SEPARATOR.'console'.DIRECTORY_SEPARATOR.'index.php';
        } else {
            $viewFilename = $baseViewFilePath.DIRECTORY_SEPARATOR.'web'.DIRECTORY_SEPARATOR.'index.php';
        }

        $this->renderViewFile($viewFilename, $this->result);
    }
982581
def render_source(output_dir, package_specs, version):
  
  destination_filename = "%s/sbp_out.tex" % output_dir
  py_template = JENV.get_template(TEMPLATE_NAME)
  stable_msgs = []
  unstable_msgs = []
  prims = []
  for p in sorted(package_specs, key=attrgetter('identifier')):
    pkg_name = p.identifier
    stable = p.stable

    # build list of required definitions (this package plus includes)
    # TODO: recursively include files
    definitions = p.definitions
    for inc in p.includes:
      inc_basename = inc.split(".")[0]
      for pkg in package_specs:
        if pkg.identifier.endswith(inc_basename):
          definitions += pkg.definitions

    if pkg_name == "swiftnav.sbp.types":
      prims = p.definitions
    for d in p.definitions:
      if d.public and d.static and d.sbp_id:
        items, size, multiplier \
          = handle_fields(definitions, d.fields, "", 0, None)
        adj_size = ""
        if multiplier == 1:
          adj_size = "N+%d" % (size - 1) if size > 1 else "N"
        elif multiplier:
           if multiplier == size:
             adj_size = "%dN" % multiplier
           else:
             adj_size = "%dN+%d" % (multiplier, size - multiplier)
        else:
          adj_size = "%d" % size
        ti = TableItem(pkg_name, d.identifier, d.sbp_id,
                       d.short_desc, d.desc, adj_size, items, p.stable,
                       p.description)
        pkg_name = ""
        if stable:
          stable_msgs.append(ti)
        else:
          unstable_msgs.append(ti)
  with open(destination_filename, 'w') as f:
    f.write(py_template.render(msgs=stable_msgs,
                               umsgs=unstable_msgs,
                               prims=prims,
                               version=version))
  import subprocess
  import os
  os.chdir(output_dir)
  subprocess.call(["pdflatex", "--enable-write18",
                   "-shell-escape", "sbp_out.tex"])
  subprocess.call(["mv", "sbp_out.pdf", "../docs/sbp.pdf"])
4832
public function render()
    {
        echo '<!DOCTYPE html>', $this->html->value($this->head)->value($this->body)->render();
    }
1081923
public void generateTreeFile() throws IOException {
        Content body = getTreeHeader();
        Content headContent = getResource("doclet.Hierarchy_For_All_Packages");
        Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, false,
                HtmlStyle.title, headContent);
        Content div = HtmlTree.DIV(HtmlStyle.header, heading);
        addPackageTreeLinks(div);
        body.addContent(div);
        HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
        divTree.addStyle(HtmlStyle.contentContainer);
        addTree(classtree.baseclasses(), "doclet.Class_Hierarchy", divTree);
        addTree(classtree.baseinterfaces(), "doclet.Interface_Hierarchy", divTree);
        addTree(classtree.baseAnnotationTypes(), "doclet.Annotation_Type_Hierarchy", divTree);
        addTree(classtree.baseEnums(), "doclet.Enum_Hierarchy", divTree);
        body.addContent(divTree);
        addNavLinks(false, body);
        addBottom(body);
        printHtmlDocument(null, true, body);
    }
207112
public void render(OutputStream outputStream, Format format, int dpi) throws PrintingException {
		try {
			if (baos == null) {
				prepare();
			}
			writeDocument(outputStream, format, dpi);
		} catch (Exception e) { // NOSONAR
			throw new PrintingException(e, PrintingException.DOCUMENT_RENDER_PROBLEM);
		}
	}
385955
def _generate_html(data, out):
    '''
    
    '''
    print('<html>', file=out)
    print('<body>', file=out)
    _generate_html_table(data, out, 0)
    print('</body>', file=out)
    print('</html>', file=out)
911656
def execute(options = {})
      input_files = get_input_files(options)
      # we want to avoid printing the binary file
      input_files.delete_if do |file|
        File.binary?(file.gsub(/^\./, options[:base_dir]))
      end

      if input_files.empty?
        puts "No file found for your option: #{options}"
        return
      end

      to_htmls(input_files, options)
      generated_files = input_files.map { |f| "#{f}.xhtml" }
      index_file = "./index.html"
      IndexHtml.htmlify generated_files, base_dir: options[:base_dir],
                                         output:   index_file,
                                         drop_ext: true
      generated_files << index_file if options[:index]
      output_file = "vim_printer_#{File.basename(File.expand_path(options[:base_dir]))}.tar.gz"
      AgileUtils::FileUtil.tar_gzip_files(generated_files, output_file)
      AgileUtils::FileUtil.delete(generated_files)
      FileUtils.rm_rf(index_file) if options[:index]
      puts "Your output file is '#{File.absolute_path(output_file)}'"
    end
1003745
public function render($methodName = null, $class = null, $package = null)
    {
        if (!$this->isEnabled()) {
            return true;
        }

        if (null != $package) {
            $this->package = $this->treatPackageName($package);
        }

        if (null != $class) {
            $this->class = $class;
        }

        if (null != $methodName) {
            $this->method = $methodName;
        }

        $this->currentView = $this->getPathForView();
        @ob_start();
        @include $this->currentView;
        $this->viewBody = @ob_get_clean();
        if (!empty($this->layoutLocation)) {
            @ob_start();
            @include $this->layoutLocation;
            $this->viewBody = @ob_get_clean();
        }
        $this->response->setBody($this->viewBody);
        $this->response->sendResponse();
    }
697782
function () {
                        //Render the full file
                        return ejs.renderFile(file, data, options, function (error, content) {
                            if (error) {
                                self.emit("error", error);
                                return callback(-2);
                            }
                            //Call the provided callback with the file content
                            return callback({
                                "data": new Buffer(content), 
                                "mimeType": "text/html"
                            });
                        });
                    }
144262
def to_html(self, classes=None, notebook=False):
        
        html_renderer = HTMLFormatter(self, classes=classes,
                                      max_rows=self.max_rows,
                                      max_cols=self.max_cols,
                                      notebook=notebook)
        if hasattr(self.buf, 'write'):
            html_renderer.write_result(self.buf)
        elif isinstance(self.buf, six.string_types):
            with open(self.buf, 'w') as f:
                html_renderer.write_result(f)
        else:
            raise TypeError('buf is not a file name and it has no write '
                            ' method')
752400
def render_to_file(output_path, context, properties = {})
      File.open(output_path, 'wb') do |f|
        f.write render_to_string(context, properties)
      end
    end
984091
protected void generatePackageTreeFile() throws IOException {
        Content body = getPackageTreeHeader();
        Content headContent = getResource("doclet.Hierarchy_For_Package",
                Util.getPackageName(packagedoc));
        Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, false,
                HtmlStyle.title, headContent);
        Content div = HtmlTree.DIV(HtmlStyle.header, heading);
        if (configuration.packages.length > 1) {
            addLinkToMainTree(div);
        }
        body.addContent(div);
        HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
        divTree.addStyle(HtmlStyle.contentContainer);
        addTree(classtree.baseclasses(), "doclet.Class_Hierarchy", divTree);
        addTree(classtree.baseinterfaces(), "doclet.Interface_Hierarchy", divTree);
        addTree(classtree.baseAnnotationTypes(), "doclet.Annotation_Type_Hierarchy", divTree);
        addTree(classtree.baseEnums(), "doclet.Enum_Hierarchy", divTree);
        body.addContent(divTree);
        addNavLinks(false, body);
        addBottom(body);
        printHtmlDocument(null, true, body);
    }
479072
protected void generateClassUseFile() throws IOException {
        HtmlTree body = getClassUseHeader();
        HtmlTree div = new HtmlTree(HtmlTag.DIV);
        div.addStyle(HtmlStyle.classUseContainer);
        if (pkgSet.size() > 0) {
            addClassUse(div);
        } else {
            div.addContent(getResource("doclet.ClassUse_No.usage.of.0",
                    classdoc.qualifiedName()));
        }
        if (configuration.allowTag(HtmlTag.MAIN)) {
            mainTree.addContent(div);
            body.addContent(mainTree);
        } else {
            body.addContent(div);
        }
        HtmlTree htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
                ? HtmlTree.FOOTER()
                : body;
        addNavLinks(false, htmlTree);
        addBottom(htmlTree);
        if (configuration.allowTag(HtmlTag.FOOTER)) {
            body.addContent(htmlTree);
        }
        printHtmlDocument(null, true, body);
    }
1001958
def render(self, sources, config, out=sys.stdout):
        
        logger = logging.getLogger()
        template = self.env.get_template(self.input)
        output = template.render(sources=sources, layout=config["output"]["layout"], config=config["output"])
        if self.output == "stdout":
            out.write(output)
        else:
            dir = os.path.dirname(self.output)
            if dir and not os.path.exists(dir):
                try:
                    os.makedirs(dir)
                except IOError as ioerror:
                    logger.error('Error on creating dir "{}": {}'.format(dir, str(ioerror)))
                    return
            if config["output"]["template"] == "default":
                if config["output"]["componants"] == "local":
                    for template_dir in self.env.loader.searchpath:
                        files = (
                            os.path.join(template_dir, "resource", "js", "combined.js"),
                            os.path.join(template_dir, "resource", "css", "combined.css"),
                            os.path.join(template_dir, "resource", "font", "apidoc.eot"),
                            os.path.join(template_dir, "resource", "font", "apidoc.woff"),
                            os.path.join(template_dir, "resource", "font", "apidoc.ttf"),
                            os.path.join(template_dir, "resource", "font", "source-code-pro.eot"),
                            os.path.join(template_dir, "resource", "font", "source-code-pro.woff"),
                            os.path.join(template_dir, "resource", "font", "source-code-pro.ttf"),
                        )

                        for file in files:
                            filename = os.path.basename(file)
                            dirname = os.path.basename(os.path.dirname(file))

                            if not os.path.exists(os.path.join(dir, dirname)):
                                os.makedirs(os.path.join(dir, dirname))
                            if os.path.exists(file):
                                shutil.copyfile(file, os.path.join(dir, dirname, filename))
                            else:
                                logger.warn('Missing resource file "%s". If you run apidoc in virtualenv, run "%s"' % (filename, "python setup.py resources"))

                if config["output"]["componants"] == "remote":
                    for template_dir in self.env.loader.searchpath:
                        files = (
                            os.path.join(template_dir, "resource", "js", "combined.js"),
                            os.path.join(template_dir, "resource", "css", "combined-embedded.css"),
                            os.path.join(template_dir, "resource", "font", "apidoc.eot"),
                            os.path.join(template_dir, "resource", "font", "apidoc.woff"),
                            os.path.join(template_dir, "resource", "font", "apidoc.ttf"),
                            os.path.join(template_dir, "resource", "font", "source-code-pro.eot"),
                            os.path.join(template_dir, "resource", "font", "source-code-pro.woff"),
                            os.path.join(template_dir, "resource", "font", "source-code-pro.ttf"),
                        )

                        for file in files:
                            filename = os.path.basename(file)
                            dirname = os.path.basename(os.path.dirname(file))

                            if not os.path.exists(os.path.join(dir, dirname)):
                                os.makedirs(os.path.join(dir, dirname))
                            if os.path.exists(file):
                                shutil.copyfile(file, os.path.join(dir, dirname, filename))
                            else:
                                logger.warn('Missing resource file "%s". If you run apidoc in virtualenv, run "%s"' % (filename, "python setup.py resources"))

            open(self.output, "w").write(output)
126869
public function render()
    {
        // A file has already been uploaded
        if ($this->value) {

            // If it's required, show the icon but don't enforce it.  There is already
            // a file uploaded after all
            if ($this->isRequired()) {
                $this->setAttribute('required', null);
            }
        }

        // Continue execution
        return parent::render();
    }