commit
a82c4ef85f
|
@ -77,6 +77,8 @@ async function pdfScreenshotIndexing() {
|
||||||
orderBy: { id: "asc" },
|
orderBy: { id: "asc" },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let counter = 0;
|
||||||
|
|
||||||
// PDFs
|
// PDFs
|
||||||
for (let link of links) {
|
for (let link of links) {
|
||||||
const path = `archives/${link.collectionId}/${link.id}.pdf`;
|
const path = `archives/${link.collectionId}/${link.id}.pdf`;
|
||||||
|
@ -88,12 +90,15 @@ async function pdfScreenshotIndexing() {
|
||||||
where: { id: link.id },
|
where: { id: link.id },
|
||||||
data: { pdf: path },
|
data: { pdf: path },
|
||||||
});
|
});
|
||||||
console.log(`${link.id}`);
|
|
||||||
} else {
|
|
||||||
console.log(`${link.id}`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log("count:", counter, "id:", link.id, "PDF");
|
||||||
|
|
||||||
|
counter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
counter = 0;
|
||||||
|
|
||||||
// Screenshots (PNGs)
|
// Screenshots (PNGs)
|
||||||
for (let link of links) {
|
for (let link of links) {
|
||||||
const path = `archives/${link.collectionId}/${link.id}.png`;
|
const path = `archives/${link.collectionId}/${link.id}.png`;
|
||||||
|
@ -105,12 +110,15 @@ async function pdfScreenshotIndexing() {
|
||||||
where: { id: link.id },
|
where: { id: link.id },
|
||||||
data: { image: path },
|
data: { image: path },
|
||||||
});
|
});
|
||||||
console.log(`${link.id}`);
|
|
||||||
} else {
|
|
||||||
console.log(`${link.id}`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log("count:", counter, "id:", link.id, "PNG");
|
||||||
|
|
||||||
|
counter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
counter = 0;
|
||||||
|
|
||||||
// Screenshots (JPEGs)
|
// Screenshots (JPEGs)
|
||||||
for (let link of links) {
|
for (let link of links) {
|
||||||
const path = `archives/${link.collectionId}/${link.id}.jpeg`;
|
const path = `archives/${link.collectionId}/${link.id}.jpeg`;
|
||||||
|
@ -122,10 +130,11 @@ async function pdfScreenshotIndexing() {
|
||||||
where: { id: link.id },
|
where: { id: link.id },
|
||||||
data: { image: path },
|
data: { image: path },
|
||||||
});
|
});
|
||||||
console.log(`${link.id}`);
|
|
||||||
} else {
|
|
||||||
console.log(`${link.id}`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log("count:", counter, "id:", link.id, "JPEG");
|
||||||
|
|
||||||
|
counter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
await prisma.$disconnect();
|
await prisma.$disconnect();
|
||||||
|
|
Ŝarĝante…
Reference in New Issue