Search in sources :

Example 1 with Options

use of org.asciidoctor.Options in project gerrit by GerritCodeReview.

the class AsciiDoctor method renderFiles.

private void renderFiles(List<String> inputFiles, ZipOutputStream zip) throws IOException {
    Asciidoctor asciidoctor = JRubyAsciidoctor.create();
    for (String inputFile : inputFiles) {
        String outName = mapInFileToOutFile(inputFile, inExt, outExt);
        File out = bazel ? new File(outName) : new File(tmpdir, outName);
        if (!bazel) {
            out.getParentFile().mkdirs();
        }
        File input = new File(inputFile);
        Options options = createOptions(basedir != null ? basedir : input.getParentFile(), out);
        asciidoctor.renderFile(input, options);
        if (zip != null) {
            zipFile(out, outName, zip);
        }
    }
}
Also used : Options(org.asciidoctor.Options) File(java.io.File) Asciidoctor(org.asciidoctor.Asciidoctor) JRubyAsciidoctor(org.asciidoctor.internal.JRubyAsciidoctor)

Aggregations

File (java.io.File)1 Asciidoctor (org.asciidoctor.Asciidoctor)1 Options (org.asciidoctor.Options)1 JRubyAsciidoctor (org.asciidoctor.internal.JRubyAsciidoctor)1