diff --git a/scan_test.go b/scan_test.go index 1198ee6..be37d7a 100644 --- a/scan_test.go +++ b/scan_test.go @@ -31,6 +31,17 @@ func TestWanted(t *testing.T) { {"Android Software Engineer", "Amsterdam", false}, {"Software Engineer in Test", "Amsterdam", false}, {"Account Executive", "Amsterdam", false}, + {"Senior Java Software Engineer - Payments", "Amsterdam", false}, + {"Software Engineer (Java) - Screening Team", "Amsterdam", false}, + {"Haskell Software Engineer - Creatives Team", "Utrecht", false}, + {"Senior Software Engineer, C++", "Amsterdam", false}, + {"C++ Software Engineer", "Amsterdam", false}, + {"Backend Engineer (.NET)", "Amsterdam", false}, + {"Software Engineer C#/Python", "Amsterdam", false}, + {"Forward Deployed Engineer - full Stack", "Amsterdam", false}, + {"Fullstack Engineer (JavaScript, Python)", "Amsterdam", true}, + {"Software Engineer - Scalability", "Amsterdam", true}, + {"Backend Engineer, Rubyists welcome", "Amsterdam", true}, {"Data Analyst", "Utrecht", false}, } for _, tt := range tests { diff --git a/sources.go b/sources.go index 70467cb..f663aa6 100644 --- a/sources.go +++ b/sources.go @@ -58,6 +58,23 @@ type Job struct { DetailURL string } +// excludeTitles drops a job when its title names one of these, whole words +// only ("Java" does not match "JavaScript"). Add languages or role names here. +var excludeTitles = []string{ + // languages + "Java", "Haskell", "C++", "C#", ".NET", "Scala", "Kotlin", "PHP", "Ruby", "Perl", + // roles + "Forward Deployed", +} + +var reExcluded = func() *regexp.Regexp { + words := make([]string, len(excludeTitles)) + for i, w := range excludeTitles { + words[i] = regexp.QuoteMeta(w) + } + return regexp.MustCompile(`(?i)(^|[^a-z0-9.])(` + strings.Join(words, "|") + `)([^a-z0-9+#]|$)`) +}() + var ( // The search profile: backend and fullstack roles in the Netherlands. reWantTitle = regexp.MustCompile(`(?i)back[- ]?end|full[- ]?stack|software (engineer|developer|ontwikkelaar)|python|golang|django|\bgo (engineer|developer)`) @@ -68,7 +85,8 @@ var ( // wanted is the cheap filter that runs before Claude sees anything. func wanted(j Job) bool { - if !reNL.MatchString(j.Location) || !reWantTitle.MatchString(j.Title) || reSkipTitle.MatchString(j.Title) { + if !reNL.MatchString(j.Location) || !reWantTitle.MatchString(j.Title) || + reSkipTitle.MatchString(j.Title) || reExcluded.MatchString(j.Title) { return false } // "Frontend engineer" is out, "Fullstack (frontend-leaning)" stays in.