diff --git a/generate.js b/generate.js deleted file mode 100644 index 16ef4cf..0000000 --- a/generate.js +++ /dev/null @@ -1,54 +0,0 @@ -const fs = require("fs") - - -/** - * @param length {number} - * @param base {number} - * @returns {string} - */ -const randomName = (length = 6, base= 36) => { - const min = length > 1 ? Math.pow(base, length - 1) : 0; - const max = Math.pow(base, length); - return Math.floor((Math.random() * (max - min)) + min).toString(base); -} - - -/** - * @param url {string} - * @returns {``} - */ -const metaRedirect = (url) => `` - - -/** - * @param url {string} - * @returns {``} - */ -const jsRedirect = (url) => `` - - -// noinspection HtmlRequiredLangAttribute,HtmlRequiredTitleElement -/** - * @param url {string} - * @param meta {boolean} - * @returns {string} - */ -const template = (url, meta = true) => ` - -
- -${meta ? metaRedirect(url) : jsRedirect(url)} - -`.replace(/\n/g, "") - - -process.argv - .slice(2) - .map(u => u.trim()) - .filter(u => !!u) - .forEach((url) => { - const name = randomName() - console.log(url) - console.log(`https://purl.aarhusstadsarkiv.dk/${name}.html\n`) - fs.writeFileSync(`${name}.html`, template(url)) - }) \ No newline at end of file diff --git a/template.html b/template.html deleted file mode 100644 index 4e12798..0000000 --- a/template.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - -