diff --git a/src/article/main.md b/src/article/main.md
index 25e813d..ca4e021 100644
--- a/src/article/main.md
+++ b/src/article/main.md
@@ -264,7 +264,7 @@
%English
One can also obtain the specific energy levels for this wave function:
-%Germany
+%German
Man kann auch die speziellen Energieniveaus dieser Wellenfunktion erhalten:
%common
diff --git a/src/article/main.md b/src/article/main.md
index 25e813d..ca4e021 100644
--- a/src/article/main.md
+++ b/src/article/main.md
@@ -264,7 +264,7 @@
%English
One can also obtain the specific energy levels for this wave function:
-%Germany
+%German
Man kann auch die speziellen Energieniveaus dieser Wellenfunktion erhalten:
%common
diff --git a/src/build.js b/src/build.js
index 45ef943..0239405 100644
--- a/src/build.js
+++ b/src/build.js
@@ -2,42 +2,30 @@
import { exec } from "child_process"
import {processMarkdown} from './markdown.js'
+const links = {
+ "../../node_modules/reveal.js/dist/reveal.css": "build/css/",
+ "../../node_modules/reveal.js/dist/theme/moon.css": "build/css/",
+ "../../node_modules/reveal.js/dist/reveal.js": "build/js/",
+ "../../src/static/css/style.css": "build/css/",
+}
+
const buildFolder = "build"
-const articleFolder = "src/article"
const flags = {
German: '🇩🇪',
English: '🇬🇧',
}
-
const languages = Object.keys(flags)
-console.log("clearing the build folder...");
+const formats = ['article', 'presentation']
-rmSync(`${buildFolder}`, { recursive: true, force: true }, (error) => {if (error) {console.error(error);}});
-if (!existsSync(buildFolder)) {
- mkdirSync(buildFolder);
+function readDirectory(directory) {
+ return readdirSync(directory).reduce((o, fileName) => ({
+ ...o,
+ [fileName.replace(".md", "")]: processMarkdown(readFileSync(`${directory}/${fileName}`, 'utf8').split("\n"), languages)
+ }), {});
}
-console.log("linking static files...");
-exec(`ls src/static | while read in; do ln ../src/static/$in ${buildFolder} -s; done`)
-
-console.log("reading article files...");
-const articleEntries = readdirSync(articleFolder).reduce((o, fileName) => ({
- ...o,
- [fileName.replace(".md", "")]: readFileSync(`${articleFolder}/${fileName}`, 'utf8').split("\n")
-}), {});
-
-console.log("processing article entries...");
-
-var result = Object.keys(articleEntries).reduce((o, name) => ({
- ...o,
- [name]: processMarkdown(articleEntries[name], languages)
-}), {})
-
-console.log("loading template...");
-const template = readFileSync('src/template.html', 'utf8');
-
function generateLanguageSwitch(name) {
var result = ""
for (const [language, flag] of Object.entries(flags)) {
@@ -46,12 +34,43 @@
return result
}
-console.log("writing articles...");
-for (const [name, data] of Object.entries(result)) {
- for (const [language, text] of Object.entries(data)) {
- writeFile(`${buildFolder}/${name}_${language}.html`,
- template.replace("", text)
- .replace("", generateLanguageSwitch(name)),
- (error) => {});
+console.log("clearing the build folder...");
+
+rmSync(`${buildFolder}`, { recursive: true, force: true }, (error) => {if (error) {console.error(error);}});
+if (!existsSync(buildFolder)) {
+ mkdirSync(buildFolder);
+}
+if (!existsSync(buildFolder + "/css")) {
+ mkdirSync(buildFolder + "/css");
+}
+if (!existsSync(buildFolder + "/js")) {
+ mkdirSync(buildFolder + "/js");
+}
+
+console.log("linking static files...")
+for (const [from, to] of Object.entries(links)) {
+ exec(`ln ${from} ${to} -s`)
+}
+
+console.log("reading files...")
+const data = formats.reduce((o, format) => ({
+ ...o,
+ [format]: {
+ data: readDirectory(`src/${format}/`),
+ template: readFileSync(`src/template_${format}.html`, 'utf8')
+ }
+}), {})
+
+console.log("writing files...");
+for (const [format, formatData] of Object.entries(data)) {
+ for (const [name, data] of Object.entries(formatData.data)) {
+ for (const [language, text] of Object.entries(data)) {
+ writeFile(`${buildFolder}/${format}_${name}_${language}.html`,
+ formatData.template
+ .replace("", text)
+ .replace("", generateLanguageSwitch(name)),
+ (error) => {});
+
+ }
}
}
diff --git a/src/article/main.md b/src/article/main.md
index 25e813d..ca4e021 100644
--- a/src/article/main.md
+++ b/src/article/main.md
@@ -264,7 +264,7 @@
%English
One can also obtain the specific energy levels for this wave function:
-%Germany
+%German
Man kann auch die speziellen Energieniveaus dieser Wellenfunktion erhalten:
%common
diff --git a/src/build.js b/src/build.js
index 45ef943..0239405 100644
--- a/src/build.js
+++ b/src/build.js
@@ -2,42 +2,30 @@
import { exec } from "child_process"
import {processMarkdown} from './markdown.js'
+const links = {
+ "../../node_modules/reveal.js/dist/reveal.css": "build/css/",
+ "../../node_modules/reveal.js/dist/theme/moon.css": "build/css/",
+ "../../node_modules/reveal.js/dist/reveal.js": "build/js/",
+ "../../src/static/css/style.css": "build/css/",
+}
+
const buildFolder = "build"
-const articleFolder = "src/article"
const flags = {
German: '🇩🇪',
English: '🇬🇧',
}
-
const languages = Object.keys(flags)
-console.log("clearing the build folder...");
+const formats = ['article', 'presentation']
-rmSync(`${buildFolder}`, { recursive: true, force: true }, (error) => {if (error) {console.error(error);}});
-if (!existsSync(buildFolder)) {
- mkdirSync(buildFolder);
+function readDirectory(directory) {
+ return readdirSync(directory).reduce((o, fileName) => ({
+ ...o,
+ [fileName.replace(".md", "")]: processMarkdown(readFileSync(`${directory}/${fileName}`, 'utf8').split("\n"), languages)
+ }), {});
}
-console.log("linking static files...");
-exec(`ls src/static | while read in; do ln ../src/static/$in ${buildFolder} -s; done`)
-
-console.log("reading article files...");
-const articleEntries = readdirSync(articleFolder).reduce((o, fileName) => ({
- ...o,
- [fileName.replace(".md", "")]: readFileSync(`${articleFolder}/${fileName}`, 'utf8').split("\n")
-}), {});
-
-console.log("processing article entries...");
-
-var result = Object.keys(articleEntries).reduce((o, name) => ({
- ...o,
- [name]: processMarkdown(articleEntries[name], languages)
-}), {})
-
-console.log("loading template...");
-const template = readFileSync('src/template.html', 'utf8');
-
function generateLanguageSwitch(name) {
var result = ""
for (const [language, flag] of Object.entries(flags)) {
@@ -46,12 +34,43 @@
return result
}
-console.log("writing articles...");
-for (const [name, data] of Object.entries(result)) {
- for (const [language, text] of Object.entries(data)) {
- writeFile(`${buildFolder}/${name}_${language}.html`,
- template.replace("", text)
- .replace("", generateLanguageSwitch(name)),
- (error) => {});
+console.log("clearing the build folder...");
+
+rmSync(`${buildFolder}`, { recursive: true, force: true }, (error) => {if (error) {console.error(error);}});
+if (!existsSync(buildFolder)) {
+ mkdirSync(buildFolder);
+}
+if (!existsSync(buildFolder + "/css")) {
+ mkdirSync(buildFolder + "/css");
+}
+if (!existsSync(buildFolder + "/js")) {
+ mkdirSync(buildFolder + "/js");
+}
+
+console.log("linking static files...")
+for (const [from, to] of Object.entries(links)) {
+ exec(`ln ${from} ${to} -s`)
+}
+
+console.log("reading files...")
+const data = formats.reduce((o, format) => ({
+ ...o,
+ [format]: {
+ data: readDirectory(`src/${format}/`),
+ template: readFileSync(`src/template_${format}.html`, 'utf8')
+ }
+}), {})
+
+console.log("writing files...");
+for (const [format, formatData] of Object.entries(data)) {
+ for (const [name, data] of Object.entries(formatData.data)) {
+ for (const [language, text] of Object.entries(data)) {
+ writeFile(`${buildFolder}/${format}_${name}_${language}.html`,
+ formatData.template
+ .replace("", text)
+ .replace("", generateLanguageSwitch(name)),
+ (error) => {});
+
+ }
}
}
diff --git a/src/presentation/main.md b/src/presentation/main.md
new file mode 100644
index 0000000..16bdcb4
--- /dev/null
+++ b/src/presentation/main.md
@@ -0,0 +1,4 @@
+%German
+## Die Schr"odinger Gleichung
+%English
+## The Schrodinger Equation
diff --git a/src/article/main.md b/src/article/main.md
index 25e813d..ca4e021 100644
--- a/src/article/main.md
+++ b/src/article/main.md
@@ -264,7 +264,7 @@
%English
One can also obtain the specific energy levels for this wave function:
-%Germany
+%German
Man kann auch die speziellen Energieniveaus dieser Wellenfunktion erhalten:
%common
diff --git a/src/build.js b/src/build.js
index 45ef943..0239405 100644
--- a/src/build.js
+++ b/src/build.js
@@ -2,42 +2,30 @@
import { exec } from "child_process"
import {processMarkdown} from './markdown.js'
+const links = {
+ "../../node_modules/reveal.js/dist/reveal.css": "build/css/",
+ "../../node_modules/reveal.js/dist/theme/moon.css": "build/css/",
+ "../../node_modules/reveal.js/dist/reveal.js": "build/js/",
+ "../../src/static/css/style.css": "build/css/",
+}
+
const buildFolder = "build"
-const articleFolder = "src/article"
const flags = {
German: '🇩🇪',
English: '🇬🇧',
}
-
const languages = Object.keys(flags)
-console.log("clearing the build folder...");
+const formats = ['article', 'presentation']
-rmSync(`${buildFolder}`, { recursive: true, force: true }, (error) => {if (error) {console.error(error);}});
-if (!existsSync(buildFolder)) {
- mkdirSync(buildFolder);
+function readDirectory(directory) {
+ return readdirSync(directory).reduce((o, fileName) => ({
+ ...o,
+ [fileName.replace(".md", "")]: processMarkdown(readFileSync(`${directory}/${fileName}`, 'utf8').split("\n"), languages)
+ }), {});
}
-console.log("linking static files...");
-exec(`ls src/static | while read in; do ln ../src/static/$in ${buildFolder} -s; done`)
-
-console.log("reading article files...");
-const articleEntries = readdirSync(articleFolder).reduce((o, fileName) => ({
- ...o,
- [fileName.replace(".md", "")]: readFileSync(`${articleFolder}/${fileName}`, 'utf8').split("\n")
-}), {});
-
-console.log("processing article entries...");
-
-var result = Object.keys(articleEntries).reduce((o, name) => ({
- ...o,
- [name]: processMarkdown(articleEntries[name], languages)
-}), {})
-
-console.log("loading template...");
-const template = readFileSync('src/template.html', 'utf8');
-
function generateLanguageSwitch(name) {
var result = ""
for (const [language, flag] of Object.entries(flags)) {
@@ -46,12 +34,43 @@
return result
}
-console.log("writing articles...");
-for (const [name, data] of Object.entries(result)) {
- for (const [language, text] of Object.entries(data)) {
- writeFile(`${buildFolder}/${name}_${language}.html`,
- template.replace("", text)
- .replace("", generateLanguageSwitch(name)),
- (error) => {});
+console.log("clearing the build folder...");
+
+rmSync(`${buildFolder}`, { recursive: true, force: true }, (error) => {if (error) {console.error(error);}});
+if (!existsSync(buildFolder)) {
+ mkdirSync(buildFolder);
+}
+if (!existsSync(buildFolder + "/css")) {
+ mkdirSync(buildFolder + "/css");
+}
+if (!existsSync(buildFolder + "/js")) {
+ mkdirSync(buildFolder + "/js");
+}
+
+console.log("linking static files...")
+for (const [from, to] of Object.entries(links)) {
+ exec(`ln ${from} ${to} -s`)
+}
+
+console.log("reading files...")
+const data = formats.reduce((o, format) => ({
+ ...o,
+ [format]: {
+ data: readDirectory(`src/${format}/`),
+ template: readFileSync(`src/template_${format}.html`, 'utf8')
+ }
+}), {})
+
+console.log("writing files...");
+for (const [format, formatData] of Object.entries(data)) {
+ for (const [name, data] of Object.entries(formatData.data)) {
+ for (const [language, text] of Object.entries(data)) {
+ writeFile(`${buildFolder}/${format}_${name}_${language}.html`,
+ formatData.template
+ .replace("", text)
+ .replace("", generateLanguageSwitch(name)),
+ (error) => {});
+
+ }
}
}
diff --git a/src/presentation/main.md b/src/presentation/main.md
new file mode 100644
index 0000000..16bdcb4
--- /dev/null
+++ b/src/presentation/main.md
@@ -0,0 +1,4 @@
+%German
+## Die Schr"odinger Gleichung
+%English
+## The Schrodinger Equation
diff --git a/src/template.html b/src/template.html
deleted file mode 100644
index 3ad976d..0000000
--- a/src/template.html
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/article/main.md b/src/article/main.md
index 25e813d..ca4e021 100644
--- a/src/article/main.md
+++ b/src/article/main.md
@@ -264,7 +264,7 @@
%English
One can also obtain the specific energy levels for this wave function:
-%Germany
+%German
Man kann auch die speziellen Energieniveaus dieser Wellenfunktion erhalten:
%common
diff --git a/src/build.js b/src/build.js
index 45ef943..0239405 100644
--- a/src/build.js
+++ b/src/build.js
@@ -2,42 +2,30 @@
import { exec } from "child_process"
import {processMarkdown} from './markdown.js'
+const links = {
+ "../../node_modules/reveal.js/dist/reveal.css": "build/css/",
+ "../../node_modules/reveal.js/dist/theme/moon.css": "build/css/",
+ "../../node_modules/reveal.js/dist/reveal.js": "build/js/",
+ "../../src/static/css/style.css": "build/css/",
+}
+
const buildFolder = "build"
-const articleFolder = "src/article"
const flags = {
German: '🇩🇪',
English: '🇬🇧',
}
-
const languages = Object.keys(flags)
-console.log("clearing the build folder...");
+const formats = ['article', 'presentation']
-rmSync(`${buildFolder}`, { recursive: true, force: true }, (error) => {if (error) {console.error(error);}});
-if (!existsSync(buildFolder)) {
- mkdirSync(buildFolder);
+function readDirectory(directory) {
+ return readdirSync(directory).reduce((o, fileName) => ({
+ ...o,
+ [fileName.replace(".md", "")]: processMarkdown(readFileSync(`${directory}/${fileName}`, 'utf8').split("\n"), languages)
+ }), {});
}
-console.log("linking static files...");
-exec(`ls src/static | while read in; do ln ../src/static/$in ${buildFolder} -s; done`)
-
-console.log("reading article files...");
-const articleEntries = readdirSync(articleFolder).reduce((o, fileName) => ({
- ...o,
- [fileName.replace(".md", "")]: readFileSync(`${articleFolder}/${fileName}`, 'utf8').split("\n")
-}), {});
-
-console.log("processing article entries...");
-
-var result = Object.keys(articleEntries).reduce((o, name) => ({
- ...o,
- [name]: processMarkdown(articleEntries[name], languages)
-}), {})
-
-console.log("loading template...");
-const template = readFileSync('src/template.html', 'utf8');
-
function generateLanguageSwitch(name) {
var result = ""
for (const [language, flag] of Object.entries(flags)) {
@@ -46,12 +34,43 @@
return result
}
-console.log("writing articles...");
-for (const [name, data] of Object.entries(result)) {
- for (const [language, text] of Object.entries(data)) {
- writeFile(`${buildFolder}/${name}_${language}.html`,
- template.replace("", text)
- .replace("", generateLanguageSwitch(name)),
- (error) => {});
+console.log("clearing the build folder...");
+
+rmSync(`${buildFolder}`, { recursive: true, force: true }, (error) => {if (error) {console.error(error);}});
+if (!existsSync(buildFolder)) {
+ mkdirSync(buildFolder);
+}
+if (!existsSync(buildFolder + "/css")) {
+ mkdirSync(buildFolder + "/css");
+}
+if (!existsSync(buildFolder + "/js")) {
+ mkdirSync(buildFolder + "/js");
+}
+
+console.log("linking static files...")
+for (const [from, to] of Object.entries(links)) {
+ exec(`ln ${from} ${to} -s`)
+}
+
+console.log("reading files...")
+const data = formats.reduce((o, format) => ({
+ ...o,
+ [format]: {
+ data: readDirectory(`src/${format}/`),
+ template: readFileSync(`src/template_${format}.html`, 'utf8')
+ }
+}), {})
+
+console.log("writing files...");
+for (const [format, formatData] of Object.entries(data)) {
+ for (const [name, data] of Object.entries(formatData.data)) {
+ for (const [language, text] of Object.entries(data)) {
+ writeFile(`${buildFolder}/${format}_${name}_${language}.html`,
+ formatData.template
+ .replace("", text)
+ .replace("", generateLanguageSwitch(name)),
+ (error) => {});
+
+ }
}
}
diff --git a/src/presentation/main.md b/src/presentation/main.md
new file mode 100644
index 0000000..16bdcb4
--- /dev/null
+++ b/src/presentation/main.md
@@ -0,0 +1,4 @@
+%German
+## Die Schr"odinger Gleichung
+%English
+## The Schrodinger Equation
diff --git a/src/template.html b/src/template.html
deleted file mode 100644
index 3ad976d..0000000
--- a/src/template.html
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/template_article.html b/src/template_article.html
new file mode 100644
index 0000000..3ad976d
--- /dev/null
+++ b/src/template_article.html
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/article/main.md b/src/article/main.md
index 25e813d..ca4e021 100644
--- a/src/article/main.md
+++ b/src/article/main.md
@@ -264,7 +264,7 @@
%English
One can also obtain the specific energy levels for this wave function:
-%Germany
+%German
Man kann auch die speziellen Energieniveaus dieser Wellenfunktion erhalten:
%common
diff --git a/src/build.js b/src/build.js
index 45ef943..0239405 100644
--- a/src/build.js
+++ b/src/build.js
@@ -2,42 +2,30 @@
import { exec } from "child_process"
import {processMarkdown} from './markdown.js'
+const links = {
+ "../../node_modules/reveal.js/dist/reveal.css": "build/css/",
+ "../../node_modules/reveal.js/dist/theme/moon.css": "build/css/",
+ "../../node_modules/reveal.js/dist/reveal.js": "build/js/",
+ "../../src/static/css/style.css": "build/css/",
+}
+
const buildFolder = "build"
-const articleFolder = "src/article"
const flags = {
German: '🇩🇪',
English: '🇬🇧',
}
-
const languages = Object.keys(flags)
-console.log("clearing the build folder...");
+const formats = ['article', 'presentation']
-rmSync(`${buildFolder}`, { recursive: true, force: true }, (error) => {if (error) {console.error(error);}});
-if (!existsSync(buildFolder)) {
- mkdirSync(buildFolder);
+function readDirectory(directory) {
+ return readdirSync(directory).reduce((o, fileName) => ({
+ ...o,
+ [fileName.replace(".md", "")]: processMarkdown(readFileSync(`${directory}/${fileName}`, 'utf8').split("\n"), languages)
+ }), {});
}
-console.log("linking static files...");
-exec(`ls src/static | while read in; do ln ../src/static/$in ${buildFolder} -s; done`)
-
-console.log("reading article files...");
-const articleEntries = readdirSync(articleFolder).reduce((o, fileName) => ({
- ...o,
- [fileName.replace(".md", "")]: readFileSync(`${articleFolder}/${fileName}`, 'utf8').split("\n")
-}), {});
-
-console.log("processing article entries...");
-
-var result = Object.keys(articleEntries).reduce((o, name) => ({
- ...o,
- [name]: processMarkdown(articleEntries[name], languages)
-}), {})
-
-console.log("loading template...");
-const template = readFileSync('src/template.html', 'utf8');
-
function generateLanguageSwitch(name) {
var result = ""
for (const [language, flag] of Object.entries(flags)) {
@@ -46,12 +34,43 @@
return result
}
-console.log("writing articles...");
-for (const [name, data] of Object.entries(result)) {
- for (const [language, text] of Object.entries(data)) {
- writeFile(`${buildFolder}/${name}_${language}.html`,
- template.replace("", text)
- .replace("", generateLanguageSwitch(name)),
- (error) => {});
+console.log("clearing the build folder...");
+
+rmSync(`${buildFolder}`, { recursive: true, force: true }, (error) => {if (error) {console.error(error);}});
+if (!existsSync(buildFolder)) {
+ mkdirSync(buildFolder);
+}
+if (!existsSync(buildFolder + "/css")) {
+ mkdirSync(buildFolder + "/css");
+}
+if (!existsSync(buildFolder + "/js")) {
+ mkdirSync(buildFolder + "/js");
+}
+
+console.log("linking static files...")
+for (const [from, to] of Object.entries(links)) {
+ exec(`ln ${from} ${to} -s`)
+}
+
+console.log("reading files...")
+const data = formats.reduce((o, format) => ({
+ ...o,
+ [format]: {
+ data: readDirectory(`src/${format}/`),
+ template: readFileSync(`src/template_${format}.html`, 'utf8')
+ }
+}), {})
+
+console.log("writing files...");
+for (const [format, formatData] of Object.entries(data)) {
+ for (const [name, data] of Object.entries(formatData.data)) {
+ for (const [language, text] of Object.entries(data)) {
+ writeFile(`${buildFolder}/${format}_${name}_${language}.html`,
+ formatData.template
+ .replace("", text)
+ .replace("", generateLanguageSwitch(name)),
+ (error) => {});
+
+ }
}
}
diff --git a/src/presentation/main.md b/src/presentation/main.md
new file mode 100644
index 0000000..16bdcb4
--- /dev/null
+++ b/src/presentation/main.md
@@ -0,0 +1,4 @@
+%German
+## Die Schr"odinger Gleichung
+%English
+## The Schrodinger Equation
diff --git a/src/template.html b/src/template.html
deleted file mode 100644
index 3ad976d..0000000
--- a/src/template.html
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/template_article.html b/src/template_article.html
new file mode 100644
index 0000000..3ad976d
--- /dev/null
+++ b/src/template_article.html
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/template_presentation.html b/src/template_presentation.html
new file mode 100644
index 0000000..d0352b0
--- /dev/null
+++ b/src/template_presentation.html
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+