Handle hashtag case

main
Bob Mottram 2020-12-03 12:42:12 +00:00
parent 51fbacd691
commit b55df96f3a
1 changed files with 7 additions and 1 deletions

View File

@ -111,6 +111,12 @@ def setHashtagCategory(baseDir: str, hashtag: str, category: str) -> bool:
if not validHashtagCategory(category):
return False
hashtagFilename = baseDir + '/tags/' + hashtag + '.txt'
if not os.path.isfile(hashtagFilename):
hashtag = hashtag.title()
hashtagFilename = baseDir + '/tags/' + hashtag + '.txt'
if not os.path.isfile(hashtagFilename):
hashtag = hashtag.upper()
hashtagFilename = baseDir + '/tags/' + hashtag + '.txt'
if not os.path.isfile(hashtagFilename):
return False