Skip to content

Commit

Permalink
use sigil-based filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
thvitt committed Apr 6, 2018
1 parent 4186b23 commit 65d96d0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/net/faustedition/gen/DiplomaticConversion.java
Expand Up @@ -90,9 +90,11 @@ public Path source() {
}

private Path getPagePath(final String extension) {
return getNewPagePath(extension);
/*
final Path relPath = document.relPath;
return Paths.get(relPath.subpath(1, relPath.getNameCount()).toString(),
MessageFormat.format("page_{0}.{1}", pageNo, extension));
MessageFormat.format("page_{0}.{1}", pageNo, extension)); */
}

private Path getNewPagePath(final String extension) {
Expand Down Expand Up @@ -205,7 +207,7 @@ public Stream<TranscriptPage> transcripts() {
try {
final XMLTag doc = XMLDoc.from(path.toFile()).deletePrefixes();
sigil = doc.gotoTag("//idno[@type='faustedition']").getText();
basename = sigil.replace("α", "alpha").replaceAll("[^A-Za-z0-9.-]+", "_");
basename = sigil.replaceAll("\\s+", "_"); // sigil.replace("α", "alpha").replaceAll("[^A-Za-z0-9.-]+", "_");
base = URI.create(doc.gotoTag("//*[@base]").getAttribute("base"));
final Builder<TranscriptPage> builder = Stream.builder();
doc.forEach(tag -> builder.accept(new TranscriptPage(this, tag.getAttribute("uri"), tag.rawXpathNumber("count(preceding::page)").intValue()+1)),
Expand Down

0 comments on commit 65d96d0

Please sign in to comment.