32 lines
845 B
JavaScript
32 lines
845 B
JavaScript
|
const fs = require('fs');
|
||
|
|
||
|
const project_list = fs.readFileSync('input/project_list.csv', 'utf8').split('\n');
|
||
|
const project_used = [];
|
||
|
|
||
|
const categories = [
|
||
|
"2d_anim", "3d_anim", "3d_asset", "film_video", "games", "illustration", "vfx"
|
||
|
];
|
||
|
|
||
|
project_list.forEach(() => {
|
||
|
project_used.push(false);
|
||
|
})
|
||
|
categories.forEach((category) => {
|
||
|
const file = fs.readFileSync(`input/categories/${category}.csv`, 'utf8').replace("\"\"", "\"");
|
||
|
project_list.forEach((val, idx) => {
|
||
|
if (file.includes(val)) {
|
||
|
project_used[idx] = true;
|
||
|
}
|
||
|
})
|
||
|
})
|
||
|
|
||
|
|
||
|
let unused_project_count = 0;
|
||
|
for (let i = 0; i < project_used.length; i++) {
|
||
|
if (!project_used[i]) {
|
||
|
unused_project_count++;
|
||
|
console.log("UNUSED: ", project_list[i]);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
console.log("There are ", unused_project_count, " unused projects total");
|