docs(website): add worked guides and keep Pages publishing manual (#925)
* fix(pages): reserve publishing for the REA website * docs(website): add worked guides and agent prompt examples * ci(website): check relevant PRs and publish only on demand * docs(website): clarify IDA coverage and analysis session lifetime
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
document.querySelector("#export").addEventListener("click", async () => {
|
||||
const status = document.querySelector("#status");
|
||||
try {
|
||||
const response = await fetch("./notes.json");
|
||||
if (!response.ok)
|
||||
throw new Error(`Notes request failed: ${response.status}`);
|
||||
const { notes } = await response.json();
|
||||
const quote = (value) => `"${String(value).replaceAll('"', '""')}"`;
|
||||
const csv =
|
||||
[
|
||||
"id,title",
|
||||
...notes.map((note) => `${note.id},${quote(note.title)}`),
|
||||
].join("\n") + "\n";
|
||||
const url = URL.createObjectURL(new Blob([csv], { type: "text/csv" }));
|
||||
const link = document.createElement("a");
|
||||
link.href = url;
|
||||
link.download = "notes.csv";
|
||||
link.click();
|
||||
window.setTimeout(() => URL.revokeObjectURL(url), 1000);
|
||||
status.textContent = `Exported ${notes.length} notes to notes.csv.`;
|
||||
} catch (error) {
|
||||
status.textContent = error.message;
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user