refacto: compendium rebuild avec dossier Tarot

Les 78 cartes sont rangées dans un dossier 'Tarot' dans le
compendium système. Le script generate-tarot-packs crée le
dossier puis y place chaque carte.
This commit is contained in:
2026-07-11 00:04:27 +02:00
parent 948100d443
commit c48ce71632
85 changed files with 105 additions and 80 deletions
+16 -1
View File
@@ -27,6 +27,21 @@ async function main() {
await fs.unlink(path.join(SRC_DIR, f))
}
// Créer le dossier Tarot dans le compendium
const tarotFolderId = "folder_tarot"
const folderDoc = {
_id: tarotFolderId,
_key: `!folders!${tarotFolderId}`,
name: "Tarot",
type: "Item",
sorting: "a",
sort: 0,
color: "#8b4513",
flags: {},
}
const folderPath = path.join(SRC_DIR, `${tarotFolderId}.json`)
await fs.writeFile(folderPath, JSON.stringify(folderDoc, null, 2), "utf-8")
// Write each card as a single JSON document file
for (let i = 0; i < cards.length; i++) {
const card = cards[i]
@@ -37,7 +52,7 @@ async function main() {
name: card.name,
type: "tarot",
img: "icons/svg/treasure.svg",
folder: null,
folder: tarotFolderId,
sort: (i + 1) * 100000,
flags: {},
system: {