-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
7 changed files
with
42 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Redirecting...</title> | ||
<meta http-equiv="refresh" content="0; url=./index.xml"> | ||
</head> | ||
<body> | ||
<p>If you are not redirected automatically, follow this <a href="./index.xml">link</a>.</p> | ||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { mkdirSync } from 'node:fs' | ||
|
||
const file = Bun.file('./output/forest.json') | ||
const output = await file.text() | ||
const all_trees = JSON.parse(output) | ||
const index_html = await Bun.file('./assets/index.html').text() | ||
|
||
for (const [tree_id, tree] of Object.entries(all_trees)) { | ||
if (tree.metas) { | ||
// console.log(tree_id, tree.metas); | ||
if (tree.metas.permlink) { | ||
const permlink = tree.metas.permlink | ||
console.log(tree_id, permlink) | ||
mkdirSync(`./output/${permlink}`, { recursive: true }) | ||
await Bun.write( | ||
`./output/${permlink}/index.html`, | ||
index_html.replaceAll('./index.xml', `../${tree_id}.xml`), | ||
) | ||
} | ||
} | ||
} |
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