chore: reorganize repo structure and update docs
- move temp scripts to scripts/, cv files to cv/, jobs.csv to results/ - update index.ts and recheck.ts CSV path to results/jobs.csv - fix imports in scripts/ to use ../config.ts and ../fetch.ts - update CLAUDE.md and README.md to reflect new structure - add plans/ with LinkedIn post drafts - update .gitignore: ignore results/, jobs/, cv binaries, .DS_Store
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
import { fetchJobs, isEnglishContent } from "../fetch.ts";
|
||||
import type { SearchConfig } from "../config.ts";
|
||||
|
||||
const CSV = "./jobs.csv";
|
||||
|
||||
const existingLinks = new Set<string>();
|
||||
try {
|
||||
const text = await Bun.file(CSV).text();
|
||||
for (const line of text.split("\n").slice(1)) {
|
||||
const url = line.match(/"(https?:\/\/[^"]+)"/)?.[1];
|
||||
if (url) existingLinks.add(url);
|
||||
}
|
||||
} catch {}
|
||||
|
||||
const RAILS_KEYWORDS = [
|
||||
"Ruby on Rails",
|
||||
"Ruby Developer",
|
||||
"Rails Developer",
|
||||
"Ruby Engineer",
|
||||
"Rails Engineer",
|
||||
"Full Stack Ruby",
|
||||
"Backend Ruby",
|
||||
"RoR Developer",
|
||||
"RoR Engineer",
|
||||
].join(" OR ");
|
||||
|
||||
const searches: SearchConfig[] = [
|
||||
{
|
||||
label: "Switzerland Remote Rails (Zürich)",
|
||||
keywords: RAILS_KEYWORDS,
|
||||
geoId: "102436504",
|
||||
location: "Zürich, Switzerland",
|
||||
workType: ["remote"],
|
||||
timePosted: "month",
|
||||
},
|
||||
{
|
||||
label: "Switzerland Remote Rails (by name)",
|
||||
keywords: RAILS_KEYWORDS,
|
||||
location: "Switzerland",
|
||||
workType: ["remote"],
|
||||
timePosted: "month",
|
||||
},
|
||||
{
|
||||
label: "Switzerland Remote Rails (Basel)",
|
||||
keywords: RAILS_KEYWORDS,
|
||||
geoId: "103383283",
|
||||
location: "Basel",
|
||||
workType: ["remote"],
|
||||
timePosted: "month",
|
||||
},
|
||||
];
|
||||
|
||||
type Result = { title: string; company: string; id: string; link: string };
|
||||
const results: Result[] = [];
|
||||
const seen = new Set<string>();
|
||||
|
||||
for (const config of searches) {
|
||||
console.log(`\n[${config.label}]`);
|
||||
const jobs = await fetchJobs(config, { raw: true }); // raw: bypass SOFTWARE_TITLE_RE, we want all Rails hits
|
||||
|
||||
for (const job of jobs) {
|
||||
if (seen.has(job.id) || existingLinks.has(job.link)) continue;
|
||||
seen.add(job.id);
|
||||
|
||||
process.stdout.write(` checking content: ${job.title} @ ${job.company} … `);
|
||||
const english = await isEnglishContent(job.id);
|
||||
if (!english) {
|
||||
console.log("dropped (non-English)");
|
||||
continue;
|
||||
}
|
||||
console.log("ok");
|
||||
results.push({ title: job.title, company: job.company, id: job.id, link: job.link });
|
||||
}
|
||||
}
|
||||
|
||||
console.log(`\n${results.length} new Rails remote jobs found.\n`);
|
||||
for (const r of results) {
|
||||
console.log(`${r.title} | ${r.company} | ${r.link}`);
|
||||
}
|
||||
Reference in New Issue
Block a user