@Override public void run(final Config conf) throws Exception { String input = get("input"); if (input == null) { throw new IllegalArgumentException("Required option 'svg-symbol.input' not present"); } Path basedir = Paths.get(get("basedir").toString()); Path dir = basedir.resolve(input); List<CharSequence> cssout = new ArrayList<>(); Element svg = new Element(Tag.valueOf("svg"), ""); attrs("svg", "output").forEach((n, v) -> svg.attr(n, v.toString())); files(dir, file -> { log.debug("{}", file); String id = get("id.prefix") + file.getFileName().toString().replace(".svg", "") + get("id.suffix"); Tuple<Element, Element> rewrite = symbol(file, id); svg.appendChild(rewrite._2); cssout.add(css(id, rewrite._1)); }); write(basedir.resolve(svgPath()), ImmutableList.of(svg.outerHtml())); write(basedir.resolve(cssPath()), cssout); }