feat: exclude titles that name unwanted languages or roles
This commit is contained in:
@@ -31,6 +31,17 @@ func TestWanted(t *testing.T) {
|
|||||||
{"Android Software Engineer", "Amsterdam", false},
|
{"Android Software Engineer", "Amsterdam", false},
|
||||||
{"Software Engineer in Test", "Amsterdam", false},
|
{"Software Engineer in Test", "Amsterdam", false},
|
||||||
{"Account Executive", "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},
|
{"Data Analyst", "Utrecht", false},
|
||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
|
|||||||
+19
-1
@@ -58,6 +58,23 @@ type Job struct {
|
|||||||
DetailURL string
|
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 (
|
var (
|
||||||
// The search profile: backend and fullstack roles in the Netherlands.
|
// 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)`)
|
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.
|
// wanted is the cheap filter that runs before Claude sees anything.
|
||||||
func wanted(j Job) bool {
|
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
|
return false
|
||||||
}
|
}
|
||||||
// "Frontend engineer" is out, "Fullstack (frontend-leaning)" stays in.
|
// "Frontend engineer" is out, "Fullstack (frontend-leaning)" stays in.
|
||||||
|
|||||||
Reference in New Issue
Block a user