Job search and people-to-sql with Bun

This commit is contained in:
2025-07-26 18:28:42 -07:00
parent ebc1cf49f5
commit abeb1892df
7 changed files with 241 additions and 54 deletions

36
Scripts/job-search.js Normal file
View File

@ -0,0 +1,36 @@
import year from '../.vscode/helper/year.job.json' with { type: 'json' };
import event from '../.vscode/helper/event.job.json' with { type: 'json' };
let file;
let fromYear = [];
let fromEvent = [];
let fromYearEventPresent = [];
let fromEventYearPresent = [];
const pathA = 'L:/Git/AA/.vscode/helper/from-year-event-present.json';
const pathB = 'L:/Git/AA/.vscode/helper/from-event-year-present.json';
year.Files.forEach(element => {
file = element.RelativePath.split('\\')[1];
fromYear.push(file);
});
event.Files.forEach(element => {
file = element.RelativePath.split('\\')[1];
fromEvent.push(file);
if (fromYear.includes(file)){
fromYearEventPresent.push(file);
}
});
year.Files.forEach(element => {
file = element.RelativePath.split('\\')[1];
if (fromEvent.includes(file)){
fromEventYearPresent.push(file);
};
});
const jsonA = JSON.stringify(fromYearEventPresent);
await Bun.write(pathA, jsonA);
const jsonB = JSON.stringify(fromEventYearPresent);
await Bun.write(pathB, jsonB);