Formatting of list of skills

main
Bob Mottram 2021-05-16 11:59:32 +01:00
parent c1eda4399b
commit 797bd5720a
1 changed files with 7 additions and 1 deletions

View File

@ -728,11 +728,17 @@ def htmlHeaderWithPersonMarkup(cssFilename: str, instanceTitle: str,
occupationStr += ' "name": "' + occupationName + '",\n'
skillsList = actorJson['hasOccupation']['skills']
if skillsList:
skillsListStr = '['
for skillStr in skillsList:
if skillsListStr != '[':
skillsListStr += ', '
skillsListStr += '"' + skillStr + '"'
skillsListStr += ']'
skillsMarkup = \
' "hasOccupation": {\n' + \
' "@type": "Occupation",\n' + \
occupationStr + \
' "skills": ' + str(skillsList) + '\n' + \
' "skills": ' + skillsListStr + '\n' + \
' "},\n'
cityMarkup = ''
if city: