Skip to content

Commit

Permalink
Dump out a HTML version
Browse files Browse the repository at this point in the history
  • Loading branch information
thvitt committed Jul 5, 2020
1 parent 1f3bd2c commit 37df3f6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions render-multi-pages.js
Expand Up @@ -59,6 +59,10 @@ if (process.argv.length !== 4) {
}

await page.evaluate(s => transcriptGeneration.addAboutPage(s), job.sigil);
const htmlName = job.pdfname.replace(/pdf$/, 'html');
const html = await page.evaluate(() => { return transcriptGeneration.serialize(document.getRootNode()); });
await fsP.writeFile(htmlName, html, {encoding: "utf-8"});


if (!debug) {
// console.log("Saving PDF ", job.pdfname, " ...")
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/net/faustedition/gen/DiplomaticConversion.java
Expand Up @@ -419,7 +419,8 @@ public static void main(final String[] args) throws IOException {
if (nThreads <= 0)
nThreads = Runtime.getRuntime().availableProcessors();

final List<Document> failedConversions = runDocumentConversion(getDocuments().collect(Collectors.toList()), nThreads);
final List<Document> failedConversions = runDocumentConversion(getDocuments()
.collect(Collectors.toList()), nThreads);
if (!failedConversions.isEmpty()) {
logger.log(Level.SEVERE, () -> MessageFormat.format("{0} documents failed to convert: {1}",
failedConversions.size(),
Expand Down
1 change: 1 addition & 0 deletions svg_rendering/page/js-gen/transcript-generation.js
Expand Up @@ -198,6 +198,7 @@ var transcriptGeneration = (function () {
serializedSvg = serializer.serializeToString(node).replace(/&nbsp;/g, '&#160;');
return serializedSvg;
};
transcriptGeneration.serialize = serialize;

transcriptGeneration.addAboutPage = function addAboutPage(sigil) {
var template = document.getElementById('aboutpage').innerHTML;
Expand Down

0 comments on commit 37df3f6

Please sign in to comment.