summaryrefslogtreecommitdiff
path: root/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'util.py')
-rw-r--r--util.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/util.py b/util.py
index e1c9e2d..bd916df 100644
--- a/util.py
+++ b/util.py
@@ -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