From abb2342f084716f9dfe18ad8f99d35b5ba09d5b2 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 12 May 2021 18:57:57 +0100 Subject: [PATCH] Occupation --- person.py | 1 + webapp_utils.py | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/person.py b/person.py index 3d7f6d04e..389a36026 100644 --- a/person.py +++ b/person.py @@ -296,6 +296,7 @@ def _createPersonBase(baseDir: str, nickname: str, domain: str, port: int, 'tts': personId + '/speaker', 'shares': personId + '/shares', 'orgSchema': None, + 'occupation': "", 'skills': {}, 'roles': {}, 'availability': None, diff --git a/webapp_utils.py b/webapp_utils.py index 899785ab5..05c38c9ce 100644 --- a/webapp_utils.py +++ b/webapp_utils.py @@ -728,8 +728,14 @@ def htmlHeaderWithPersonMarkup(cssFilename: str, instanceTitle: str, else: skillsStr += skillName if skillsStr: + occupationStr = '' + if actorJson.get('occupation'): + occupationName = actorJson['occupation'] + occupationStr = ' "name": "' + occupationName + '",\n' skillsMarkup = \ ' "hasOccupation": {\n' + \ + ' "@type": "Occupation",\n' + \ + occupationStr + \ ' "skills": "' + skillsStr + '"\n' + \ ' "},\n'