From b83c5eab015efafe9ac7d68b99200fba9e9259fd Mon Sep 17 00:00:00 2001 From: Lea Date: Sun, 16 Jun 2024 19:25:47 +0200 Subject: [PATCH] log --- src/index.ts | 2 -- src/util.ts | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index f28f126..7a0764b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -56,8 +56,6 @@ for (const c in config.pList) { const canvas = createCanvas(config.w, config.h); const ctx = canvas.getContext('2d'); -console.log(categories); - const images: { layer: number, url: string }[] = []; for (const category of categories.sort((a, b) => b.index - a.index)) { diff --git a/src/util.ts b/src/util.ts index f2552f6..20461d6 100644 --- a/src/util.ts +++ b/src/util.ts @@ -76,6 +76,8 @@ export async function getAsset(url: string) { // https://cdn.picrew.me/app/image_maker/{makerId}/{pId}/{random_string}.png const [ makerId, cId, filename ] = new URL(url).pathname.split("/").slice(-3); + console.log(`Starting download: ${makerId}/${cId}/${filename}`); + const dir = path.join(dirname, "..", "cache", "assets", makerId, cId); const filePath = path.join(dir, filename); @@ -86,5 +88,6 @@ export async function getAsset(url: string) { await downloadToPath(url, filePath); } + console.log(`Finished download: ${makerId}/${cId}/${filename}`); return filePath; }