Initial commit: RHINE LAB · ANALYSIS OS:三维界面与动效实验(本仓库不含个人归档索引数据)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import fs from "node:fs/promises";
|
||||
import { loadContent, archiveText } from "./archive-content.mjs";
|
||||
|
||||
// Validate the entire input before writing any downloads.
|
||||
const { records } = await loadContent();
|
||||
const output = new URL("../public/archives/", import.meta.url);
|
||||
await fs.mkdir(output, { recursive: true });
|
||||
for (const record of records) {
|
||||
await fs.writeFile(
|
||||
new URL(`RHINE-LAB-${record.id}.txt`, output),
|
||||
archiveText(record),
|
||||
"utf8",
|
||||
);
|
||||
}
|
||||
console.log(`Prepared ${records.length} downloadable archive records.`);
|
||||
Reference in New Issue
Block a user