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:
2026-08-27 09:03:05 +02:00
parent 3f5360f44c
commit b4957025b1
31 changed files with 2008 additions and 283 deletions
+40
View File
@@ -0,0 +1,40 @@
#!/usr/bin/env bun
import { searches } from "../config.ts";
import { fetchJobs, SOFTWARE_TITLE_RE } from "../fetch.ts";
const CSV = "./results/jobs.csv";
const BASEL_LABELS = new Set(["Basel (city)", "Basel Metropolitan Area", "Basel-Country"]);
const existingIds = new Set<string>();
try {
const text = await Bun.file(CSV).text();
for (const line of text.split("\n").slice(1)) {
const id = line.match(/\/jobs\/view\/(\d+)\//)?.[1];
if (id) existingIds.add(id);
}
} catch { /* first run */ }
const missed: { title: string; company: string; link: string }[] = [];
const seenIds = new Set<string>();
for (const config of searches.filter((s) => BASEL_LABELS.has(s.label))) {
console.log(`\n[${config.label}]`);
const all = await fetchJobs(config, { raw: true });
for (const job of all) {
if (!seenIds.has(job.id) && !existingIds.has(job.id) && !SOFTWARE_TITLE_RE.test(job.title)) {
seenIds.add(job.id);
missed.push({ title: job.title, company: job.company, link: job.link });
}
}
}
if (missed.length === 0) {
console.log("\nNo missed jobs — all new titles pass the filter.");
process.exit(0);
}
console.log(`\n── ${missed.length} new Basel-area jobs currently filtered out ──\n`);
for (const j of missed) {
console.log(` ${j.title}`);
console.log(` ${j.company} ${j.link}`);
}