mirror of https://gitlab.com/bashrc2/epicyon
Maximum hashtag length within categories
parent
89ad584eb8
commit
22a11acc35
|
|
@ -32,6 +32,7 @@ def getHashtagCategory(baseDir: str, hashtag: str) -> str:
|
||||||
def getHashtagCategories(baseDir: str, recent=False, category=None) -> None:
|
def getHashtagCategories(baseDir: str, recent=False, category=None) -> None:
|
||||||
"""Returns a dictionary containing hashtag categories
|
"""Returns a dictionary containing hashtag categories
|
||||||
"""
|
"""
|
||||||
|
maxTagLength = 42
|
||||||
hashtagCategories = {}
|
hashtagCategories = {}
|
||||||
|
|
||||||
if recent:
|
if recent:
|
||||||
|
|
@ -47,6 +48,8 @@ def getHashtagCategories(baseDir: str, recent=False, category=None) -> None:
|
||||||
if not os.path.isfile(categoryFilename):
|
if not os.path.isfile(categoryFilename):
|
||||||
continue
|
continue
|
||||||
hashtag = f.split('.')[0]
|
hashtag = f.split('.')[0]
|
||||||
|
if len(hashtag) > maxTagLength:
|
||||||
|
continue
|
||||||
with open(categoryFilename, 'r') as fp:
|
with open(categoryFilename, 'r') as fp:
|
||||||
categoryStr = fp.read()
|
categoryStr = fp.read()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue