|
tags = self.webpage.pagedata["tags"].split('|') |
|
for tag in tags: |
|
if len(tag) > 1: |
|
#Check if this is a doubled up tag |
|
#some look like this "IT OpsSoftware Development" |
|
cleantag = self.checktag(tag) |
|
if len(cleantag) > 1: |
|
stackedTags += "- " + cleantag[0] + "\n" |
|
stackedTags += "- " + cleantag[1] + "\n" |
|
else : |
|
stackedTags += "- " + cleantag[0] + "\n" |
|
|
|
self.tempText += "tags: " + '\n' + stackedTags + "\n" if stackedTags else "tags: " + "\n" |
|
|
|
|
|
def checktag(self,intag): |
|
tagtemp = [] |
|
|
|
if intag == 'CloudData Professional': |
|
tagtemp.append('Cloud') |
|
tagtemp.append('Data Professional') |
|
if intag == 'Data ProfessionalMachine Learning': |
|
tagtemp.append('Data Professional') |
|
tagtemp.append('Machine Learning') |
|
if intag == 'Data ProfessionalNews': |
|
tagtemp.append('Data Professional') |
|
tagtemp.append('News') |
|
if intag == 'Data ProfessionalTeams': |
|
tagtemp.append('Data Professional') |
|
tagtemp.append('Teams') |
|
if intag == 'IT OpsSecurity Professional': |
|
tagtemp.append('IT Ops') |
|
tagtemp.append('Security Professional') |
|
if intag == 'IT OpsSoftware Development': |
|
tagtemp.append('IT Ops') |
|
tagtemp.append('Software Development') |
|
if intag == 'Security ProfessionalSoftware Development': |
|
tagtemp.append('Security Professional') |
|
tagtemp.append('Software Development') |
|
if intag == 'CloudMachine Learning': |
|
tagtemp.append('Cloud') |
|
tagtemp.append('Machine Learning') |
|
if intag == 'IT OpsCloud': |
|
tagtemp.append('IT Ops') |
|
tagtemp.append('Cloud') |
|
if intag == 'IT OpsPlatform': |
|
tagtemp.append('IT Ops') |
|
tagtemp.append('Platform') |
|
if intag == 'Software DevelopmentCloud': |
|
tagtemp.append('Software Development') |
|
tagtemp.append('Cloud') |
|
if intag == 'NewsPlatform': |
|
tagtemp.append('News') |
|
tagtemp.append('Platform') |
|
if intag == 'PlatformNews': |
|
tagtemp.append('Platform') |
|
tagtemp.append('News') |
|
if intag == 'Security ProfessionalSoftware Development': |
|
tagtemp.append('Security Professional') |
|
tagtemp.append('Software Development') |
|
if intag == 'Software DevelopmentData Professional': |
|
tagtemp.append('Software Development') |
|
tagtemp.append('Data Professional') |
|
if intag == 'Machine LearningData Professional': |
|
tagtemp.append('Machine Learning') |
|
tagtemp.append('Data Professional') |
|
if intag == 'Software DevelopmentData Professional': |
|
tagtemp.append('Software Development') |
|
tagtemp.append('Data Professional') |
|
if intag == 'Software DevelopmentPlatform': |
|
tagtemp.append('Software Development') |
|
tagtemp.append('Platform') |
|
if intag == 'Software DevelopmentTeams': |
|
tagtemp.append('Software Development') |
|
tagtemp.append('Teams') |
|
if intag == 'CloudMachine Learning': |
|
tagtemp.append('Cloud') |
|
tagtemp.append('Machine Learning') |
|
if intag == 'Security ProfessionalData Professional': |
|
tagtemp.append('Security Professional') |
|
tagtemp.append('Data Professional') |
|
if intag == 'Data ProfessionalCreative': |
|
tagtemp.append('Data Professional') |
|
tagtemp.append('Creative') |
|
if intag == 'Machine LearningCloud': |
|
tagtemp.append('Machine Learning') |
|
tagtemp.append('Cloud') |
|
if intag == 'TeamsData Professional': |
|
tagtemp.append('Teams') |
|
tagtemp.append('Data Professional') |
|
if intag == 'TeamsIT Ops': |
|
tagtemp.append('Teams') |
|
tagtemp.append('IT Ops') |
|
if intag == 'TeamsPlatform': |
|
tagtemp.append('Teams') |
|
tagtemp.append('Platform') |
|
if intag == 'TeamsSoftware Development': |
|
tagtemp.append('Teams') |
|
tagtemp.append('Software Development') |
|
else: |
|
tagtemp.append(intag) |
|
|
|
return tagtemp |