wigolo
wigolo copied to clipboard
Add a JobPosting named schema to the extract tool
The extract tool ships named schemas (Article, Recipe, Product, CodeSnippet, Paper, EventListing) that pull structured data from pages, preferring JSON-LD when a page provides it. JobPosting is a standard schema.org type that job boards emit as JSON-LD — a natural next schema, and the existing ones are small self-contained files.
Where to look
- Template to copy:
src/extraction/v1/schemas/EventListing.ts(JSON-LD first, DOM fallback) - Schema routing:
src/extraction/v1/classifier.ts(accepts "JobPosting", "schema:JobPosting", schema.org URL forms)
Acceptance
src/extraction/v1/schemas/JobPosting.tswith fields like title, company, location, salary (when present), employment type, posted date — null when absent, never invented- Wired into the classifier + the extract tool's
named_schemaenum - Unit test with a JSON-LD fixture
npm testandnpm run lintgreen