Files
linkme/scripts/ch-remote-temp.ts
rodado b4957025b1 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.
2026-08-27 09:03:05 +02:00

35 lines
1008 B
TypeScript

import { KEYWORDS } from "../config.ts";
import { fetchJobs, isEnglishContent } from "../fetch.ts";
import { readFileSync } from "fs";
// Load existing IDs from CSV
const csv = readFileSync("./results/jobs.csv", "utf8");
const existingIds = new Set(
[...csv.matchAll(/jobs\/view\/(\d+)\//g)].map((m) => m[1])
);
const jobs = await fetchJobs({
label: "CH Remote",
keywords: KEYWORDS,
location: "Switzerland",
workType: ["remote"],
timePosted: "month",
});
const newJobs = jobs.filter((j) => !existingIds.has(j.id));
console.log(`\n${newJobs.length} new remote CH jobs. Checking English content…\n`);
const results = [];
for (const j of newJobs) {
process.stdout.write(` ${j.title} … `);
const ok = await isEnglishContent(j.id);
console.log(ok ? "ok" : "dropped (non-English)");
if (ok) results.push(j);
}
console.log(`\n${results.length} vagas remotas novas na Suíça\n`);
for (const j of results) {
console.log(`${j.title} — ${j.company}`);
console.log(` ${j.link}`);
}