-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
61ca3f6
commit dbe0f49
Showing
33 changed files
with
135 additions
and
449 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
docs/odata-data-aggregation-ext/odata-data-aggregation-ext.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,14 @@ | ||
const iterator = require("./iterator"); | ||
const pdf = require("./pdf.js"); | ||
const fs = require("fs"); | ||
|
||
fs.readdirSync(__dirname + "/..", { withFileTypes: true }).forEach(function ( | ||
doc | ||
) { | ||
if (doc.isDirectory() && doc.name.startsWith("odata-")) { | ||
fs.readdirSync(`${__dirname}/../${doc.name}`) | ||
.filter((fn) => fn.endsWith(".yaml")) | ||
.forEach(function (metaname) { | ||
pdf(doc.name, metaname.substring(0, metaname.length - 5)) | ||
.then((refreshed) => { | ||
if (refreshed) console.log("✓ " + doc.name, metaname); | ||
}) | ||
.catch((error) => { | ||
console.log("❌ " + doc.name, metaname); | ||
console.error(error); | ||
process.exitCode = 1; | ||
}); | ||
}); | ||
} | ||
iterator(function (srcname, name, variant, meta) { | ||
pdf(name, variant, meta) | ||
.then((refreshed) => { | ||
console.log(refreshed ? "✓" : "=", srcname, variant); | ||
}) | ||
.catch((error) => { | ||
console.log("❌", srcname, variant); | ||
console.error(error); | ||
process.exitCode = 1; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,40 @@ | ||
const iterator = require("./iterator"); | ||
const fs = require("fs"); | ||
const Number = require("./number"); | ||
const pandoc = require("./pandoc"); | ||
const { PassThrough } = require("stream"); | ||
const yaml = require("js-yaml"); | ||
|
||
fs.readdirSync(__dirname + "/..", { withFileTypes: true }).forEach(function ( | ||
doc | ||
) { | ||
if (doc.isDirectory() && doc.name.startsWith("odata-")) { | ||
fs.readdirSync(`${__dirname}/../${doc.name}`) | ||
.filter((fn) => fn.endsWith(".yaml")) | ||
.forEach(function (metaname) { | ||
var meta = yaml.load( | ||
fs.readFileSync(`${__dirname}/../${doc.name}/${metaname}`) | ||
); | ||
var name = | ||
metaname === "meta.yaml" || !meta.dirname ? doc.name : meta.dirname; | ||
fs.cpSync( | ||
`${__dirname}/../styles`, | ||
`${__dirname}/../docs/${name}/styles`, | ||
{ recursive: true } | ||
); | ||
var md = fs.createWriteStream( | ||
`${__dirname}/../docs/${name}/${name}.md` | ||
); | ||
var html = pandoc({ | ||
"--metadata-file": `${__dirname}/../${doc.name}/${metaname}`, | ||
}); | ||
html.stdout.pipe( | ||
fs.createWriteStream(`${__dirname}/../docs/${name}/${name}.html`) | ||
); | ||
md.write(Buffer.of(0xef, 0xbb, 0xbf)); | ||
new Number(doc.name, metaname.substring(0, metaname.length - 5)) | ||
.build( | ||
new PassThrough() | ||
.on("data", function (chunk) { | ||
md.write(chunk); | ||
html.stdin.write(chunk); | ||
}) | ||
.on("end", function () { | ||
md.end(); | ||
html.stdin.end(); | ||
}) | ||
) | ||
.then(() => { | ||
console.log("✓ " + doc.name, metaname); | ||
}) | ||
.catch((err) => { | ||
console.log("❌ " + doc.name, metaname); | ||
console.error(err.join("\n")); | ||
console.error(); | ||
process.exitCode = 1; | ||
}); | ||
}); | ||
} | ||
iterator(function (srcname, name, variant, meta) { | ||
fs.cpSync(`${__dirname}/../styles`, `${__dirname}/../docs/${name}/styles`, { | ||
recursive: true, | ||
}); | ||
var md = fs.createWriteStream(`${__dirname}/../docs/${name}/${name}.md`); | ||
var html = pandoc({ | ||
"--metadata-file": `${__dirname}/../${srcname}/${variant}.yaml`, | ||
}); | ||
html.stdout.pipe( | ||
fs.createWriteStream(`${__dirname}/../docs/${name}/${name}.html`) | ||
); | ||
md.write(Buffer.of(0xef, 0xbb, 0xbf)); | ||
new Number(srcname, variant, meta) | ||
.build( | ||
new PassThrough() | ||
.on("data", function (chunk) { | ||
md.write(chunk); | ||
html.stdin.write(chunk); | ||
}) | ||
.on("end", function () { | ||
md.end(); | ||
html.stdin.end(); | ||
}) | ||
) | ||
.then(() => { | ||
console.log("✓", srcname, variant); | ||
}) | ||
.catch((err) => { | ||
console.log("❌", srcname, variant); | ||
console.error(err.join("\n")); | ||
console.error(); | ||
process.exitCode = 1; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
const fs = require("fs"); | ||
const yaml = require("js-yaml"); | ||
|
||
module.exports = function (callback) { | ||
fs.readdirSync(__dirname + "/..", { withFileTypes: true }).forEach(function ( | ||
doc | ||
) { | ||
if (doc.isDirectory() && doc.name.startsWith("odata-")) { | ||
fs.readdirSync(`${__dirname}/../${doc.name}`) | ||
.filter((fn) => fn.endsWith(".yaml")) | ||
.forEach(function (metaname) { | ||
var meta = yaml.load( | ||
fs.readFileSync(`${__dirname}/../${doc.name}/${metaname}`) | ||
); | ||
var name = | ||
metaname === "meta.yaml" || !meta.dirname ? doc.name : meta.dirname; | ||
callback( | ||
doc.name, | ||
name, | ||
metaname.substring(0, metaname.length - 5), | ||
meta | ||
); | ||
}); | ||
} | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.