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',
'shares': personId + '/shares',
'orgSchema': None,
'occupation': "",
'skills': {},
'roles': {},
'availability': None,

View File

@ -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'