Feature: Remove message, Upgrade: pull better job data, add dedicated status section to job applications
This commit is contained in:
+39
-6
@@ -65,6 +65,21 @@ _TECH = [
|
||||
]
|
||||
|
||||
|
||||
|
||||
_SOFT = [
|
||||
"communication",
|
||||
"collaboration",
|
||||
"teamwork",
|
||||
"problem solving",
|
||||
"leadership",
|
||||
"mentoring",
|
||||
"ownership",
|
||||
"initiative",
|
||||
"adaptability",
|
||||
"stakeholder management",
|
||||
"detail oriented",
|
||||
]
|
||||
|
||||
def _strip_html(text: str) -> str:
|
||||
# Good enough for job descriptions pasted from the web.
|
||||
text = re.sub(r"<\s*br\s*/?>", "\n", text, flags=re.IGNORECASE)
|
||||
@@ -131,10 +146,14 @@ def _role_focused_excerpt(text: str) -> dict:
|
||||
nice = _extract_bullets(nice_lines, max_items=5)
|
||||
|
||||
tech_found = []
|
||||
soft_found = []
|
||||
low = cleaned.lower()
|
||||
for t in _TECH:
|
||||
if t in low:
|
||||
tech_found.append(t)
|
||||
for s in _SOFT:
|
||||
if s in low:
|
||||
soft_found.append(s)
|
||||
|
||||
# Fallback: pick bullet-like lines anywhere if sections are missing.
|
||||
if not responsibilities and not requirements:
|
||||
@@ -160,6 +179,7 @@ def _role_focused_excerpt(text: str) -> dict:
|
||||
"requirements": requirements,
|
||||
"nice": nice,
|
||||
"tech": tech_found,
|
||||
"soft": soft_found,
|
||||
}
|
||||
|
||||
|
||||
@@ -192,26 +212,39 @@ async def summarize(req: SummarizeRequest):
|
||||
|
||||
lines = ["Role summary:", summary]
|
||||
|
||||
if info["requirements"]:
|
||||
lines.append("")
|
||||
lines.append("What they need from you:")
|
||||
for x in info["requirements"][:7]:
|
||||
lines.append(f"- {x}")
|
||||
|
||||
if info["responsibilities"]:
|
||||
lines.append("")
|
||||
lines.append("Key responsibilities:")
|
||||
lines.append("What you would be doing:")
|
||||
for x in info["responsibilities"][:6]:
|
||||
lines.append(f"- {x}")
|
||||
|
||||
if info["requirements"]:
|
||||
if info["nice"]:
|
||||
lines.append("")
|
||||
lines.append("Key requirements:")
|
||||
for x in info["requirements"][:6]:
|
||||
lines.append("Nice to have:")
|
||||
for x in info["nice"][:5]:
|
||||
lines.append(f"- {x}")
|
||||
|
||||
if info["tech"]:
|
||||
# Keep this short; it's just a hint based on keyword matches.
|
||||
uniq = []
|
||||
for t in info["tech"]:
|
||||
if t not in uniq:
|
||||
uniq.append(t)
|
||||
lines.append("")
|
||||
lines.append("Tech keywords: " + ", ".join(uniq[:14]))
|
||||
lines.append("Relevant hard skills: " + ", ".join(uniq[:14]))
|
||||
|
||||
if info["soft"]:
|
||||
uniq_soft = []
|
||||
for s in info["soft"]:
|
||||
if s not in uniq_soft:
|
||||
uniq_soft.append(s)
|
||||
lines.append("")
|
||||
lines.append("Relevant soft skills: " + ", ".join(uniq_soft[:8]))
|
||||
|
||||
out = "\n".join(lines).strip()
|
||||
cache[key] = out
|
||||
|
||||
Reference in New Issue
Block a user