Occupation

main
Bob Mottram 2021-05-12 18:57:57 +01:00
parent f54d8c226c
commit abb2342f08
2 changed files with 7 additions and 0 deletions

View File

@ -296,6 +296,7 @@ def _createPersonBase(baseDir: str, nickname: str, domain: str, port: int,
'tts': personId + '/speaker', 'tts': personId + '/speaker',
'shares': personId + '/shares', 'shares': personId + '/shares',
'orgSchema': None, 'orgSchema': None,
'occupation': "",
'skills': {}, 'skills': {},
'roles': {}, 'roles': {},
'availability': None, 'availability': None,

View File

@ -728,8 +728,14 @@ def htmlHeaderWithPersonMarkup(cssFilename: str, instanceTitle: str,
else: else:
skillsStr += skillName skillsStr += skillName
if skillsStr: if skillsStr:
occupationStr = ''
if actorJson.get('occupation'):
occupationName = actorJson['occupation']
occupationStr = ' "name": "' + occupationName + '",\n'
skillsMarkup = \ skillsMarkup = \
' "hasOccupation": {\n' + \ ' "hasOccupation": {\n' + \
' "@type": "Occupation",\n' + \
occupationStr + \
' "skills": "' + skillsStr + '"\n' + \ ' "skills": "' + skillsStr + '"\n' + \
' "},\n' ' "},\n'