Skip to content

Commit

Permalink
SVG Gen: Option to process only subtree
Browse files Browse the repository at this point in the history
  • Loading branch information
thvitt committed Nov 10, 2016
1 parent 2daae32 commit 175c2e4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions pom.xml
Expand Up @@ -270,6 +270,7 @@
<argument>-Dfaust.diplo.allowedFailures=${faust.diplo.allowedFailures}</argument>
<argument>-Dfaust.diplo.server=${faust.diplo.server}</argument>
<argument>-Dfaust.diplo.debug=${faust.diplo.debug}</argument>
<argument>-Dfaust.diplo.only=${faust.diplo.only}</argument>
<argument>net.faustedition.gen.DiplomaticConversion</argument>
</arguments>
</configuration>
Expand Down
9 changes: 8 additions & 1 deletion src/main/java/net/faustedition/gen/DiplomaticConversion.java
Expand Up @@ -235,7 +235,14 @@ public static Path resolveFaustUri(final URI uri) {
}

private static Stream<Document> getDocuments() throws IOException {
return Files.walk(root.resolve("document")).filter(path -> path.toString().endsWith(".xml")).map(
Path startDir = root.resolve("document");
String onlyDir = System.getProperty("faust.diplo.only", null);
if (onlyDir != null) {
startDir = startDir.resolve(onlyDir);
logger.warning("By user request, limiting processing to " + startDir.toString());
}

return Files.walk(startDir).filter(path -> path.toString().endsWith(".xml")).map(
path -> new Document(path));
}
}

0 comments on commit 175c2e4

Please sign in to comment.