diff options
Diffstat (limited to 'util.py')
-rw-r--r-- | util.py | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -1,5 +1,5 @@ import logging - +import re class Logger(): _instance = None @@ -27,4 +27,11 @@ def first(iterable, condition=lambda x: True): try: return next(x for x in iterable if condition(x)) except StopIteration: - return None
\ No newline at end of file + return None + +def getProjRepoName(arg): + id_, name, projNum, *_ = arg + eng = re.sub('[\u4e00-\u9fa5]', '', name) + eng = ''.join( + [word[0].capitalize() + word[1:] for word in eng.split()]) + return f"{eng}{id_}-p{projNum}"
\ No newline at end of file |