Files
jobboard/plugins/readers/_words.py
T
WolfandClaude Opus 5.5 b78c9dfc67 Search providers as reader modules: jobindex, adzuna, platsbanken
Each declares READS with scope=search, keeps every place and hands the excerpt over as teaser. search_params and PROVIDERS follow the declarations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 09:08:25 +02:00

20 lines
727 B
Python

"""What the search providers' headlines and town lines say about where the
work is done, in Danish, Swedish and English. Shared by the search readers;
a board states its own remote flag and needs none of this."""
from __future__ import annotations
import re
#: "Birkerød, Hybrid position", "Nordhavn og mulighed for hjemmearbejde".
_HYBRID = re.compile(r"\bhybrid|hjemmearbejde", re.IGNORECASE)
_REMOTE = re.compile(
r"\bremote\b|fjernarbejde|fuldt hjemmearbejde|distansarbete|på distans", re.IGNORECASE)
def remote_word(text: str) -> str | None:
"""`remote`, `hybrid` or None: the word the text says."""
if _REMOTE.search(text):
return "remote"
return "hybrid" if _HYBRID.search(text) else None