chore: update search scripts, extra sources and post drafts
Adds the one-off scripts accumulated across recent sessions, removes temp scripts whose searches now live in config.ts as role-family sweeps, and updates fetch-other.ts plus the LinkedIn post drafts.
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
import { KEYWORDS } from "../config.ts";
|
||||
import { fetchJobs, isEnglishContent } from "../fetch.ts";
|
||||
import { readFileSync } from "fs";
|
||||
|
||||
const csv = readFileSync("./results/jobs.csv", "utf8");
|
||||
const existingIds = new Set(
|
||||
[...csv.matchAll(/jobs\/view\/(\d+)\//g)].map((m) => m[1])
|
||||
);
|
||||
|
||||
const MICROSOFT_RE = /\.net\b|\bc#|sharepoint|dynamics 365|power platform|windows system|\bazure\b|\bintune\b|\bsccm\b/i;
|
||||
|
||||
const jobs = await fetchJobs({
|
||||
label: "Allschwil",
|
||||
keywords: KEYWORDS,
|
||||
location: "Allschwil, Switzerland",
|
||||
workType: ["onsite", "hybrid"],
|
||||
timePosted: "month",
|
||||
});
|
||||
|
||||
const seen = new Set<string>();
|
||||
const newJobs = jobs.filter((j) => {
|
||||
if (seen.has(j.id) || existingIds.has(j.id)) return false;
|
||||
seen.add(j.id);
|
||||
if (MICROSOFT_RE.test(j.title)) {
|
||||
console.log(` [ms-stack] dropped: ${j.title} — ${j.company}`);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
console.log(`\n${newJobs.length} new Allschwil jobs. Checking English content…\n`);
|
||||
|
||||
const results = [];
|
||||
for (const j of newJobs) {
|
||||
process.stdout.write(` ${j.title} — ${j.company} … `);
|
||||
const ok = await isEnglishContent(j.id);
|
||||
console.log(ok ? "ok" : "dropped (non-English)");
|
||||
if (ok) results.push(j);
|
||||
}
|
||||
|
||||
console.log(`\n=== ${results.length} new English Allschwil jobs ===\n`);
|
||||
for (const j of results) {
|
||||
console.log(`${j.title} | ${j.company} | ${j.link}`);
|
||||
}
|
||||
Reference in New Issue
Block a user