forked from indymedia/epicyon
Handle hashtag case
parent
51fbacd691
commit
b55df96f3a
6
utils.py
6
utils.py
|
@ -111,6 +111,12 @@ def setHashtagCategory(baseDir: str, hashtag: str, category: str) -> bool:
|
||||||
if not validHashtagCategory(category):
|
if not validHashtagCategory(category):
|
||||||
return False
|
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'
|
hashtagFilename = baseDir + '/tags/' + hashtag + '.txt'
|
||||||
if not os.path.isfile(hashtagFilename):
|
if not os.path.isfile(hashtagFilename):
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in New Issue