diff --git a/data/examples/README.md b/data/examples/README.md index 4bae642..dc08e3f 100644 --- a/data/examples/README.md +++ b/data/examples/README.md @@ -21,6 +21,7 @@ "slug": "a-speaker", "submissions": ["A1B2C3"], "affiliation": "A Company", + "occupation": "An occupation", "homepage": "https://example.com", "twitter_url": "https://x.com/B4D5E6", "linkedin_url": "https://linkedin.com/in/B4D5E6", @@ -44,6 +45,7 @@ | `slug` | `string` | URL-safe speaker name | | `submissions` | `array[string]` | Codes of sessions the speaker is involved in | | `affiliation` | `string` \| `null` | Affiliated institution or organization | +| `occupation` | `string` \| `null` | Position, Job or Occupation | | `homepage` | `string` \| `null` | Personal or professional homepage | | `twitter_url` | `string` \| `null` | Normalized Twitter/X profile URL | | `mastodon_url` | `string` \| `null` | Normalized Mastodon profile URL | diff --git a/data/examples/europython/speakers.json b/data/examples/europython/speakers.json index a8008f3..1fe9386 100644 --- a/data/examples/europython/speakers.json +++ b/data/examples/europython/speakers.json @@ -7,6 +7,7 @@ "slug": "a-speaker", "submissions": ["A8CD3F"], "affiliation": "A Company", + "occupation": "An occupation", "homepage": null, "gitx_url": "https://github.com/f3dc8a", "linkedin_url": "https://linkedin.com/in/f3dc8a", diff --git a/src/misc.py b/src/misc.py index 3085130..ab7ae44 100644 --- a/src/misc.py +++ b/src/misc.py @@ -3,6 +3,7 @@ class SpeakerQuestion: affiliation = "Company/Organization/Educational Institution" + occupation: "Position, Job or Occupation" homepage = "Social (Homepage)" twitter = "Social (X/twitter)" bluesky = "Social (Bluesky)" diff --git a/src/models/europython.py b/src/models/europython.py index cd4b8c8..7508b2b 100644 --- a/src/models/europython.py +++ b/src/models/europython.py @@ -26,6 +26,7 @@ class EuroPythonSpeaker(BaseModel): # Extracted affiliation: str | None = None + occupation: str | None = None homepage: str | None = None twitter_url: str | None = None mastodon_url: str | None = None @@ -48,6 +49,9 @@ def extract_answers(cls, values) -> dict: if answer.question_text == SpeakerQuestion.affiliation: values["affiliation"] = answer.answer_text + if answer.question_text == SpeakerQuestion.occupation: + values["occupation"] = answer.answer_text + if answer.question_text == SpeakerQuestion.homepage: values["homepage"] = answer.answer_text