Skip to content

Commit cfe1a14

Browse files
committed
Adds success, warning and info text formatters
1 parent 55b73cd commit cfe1a14

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

fet_api_to_gcal/common/utils.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,16 @@ def psuccess(text):
145145
print(bcolors.OKGREEN + text + bcolors.ENDC)
146146

147147

148+
def success_str(text):
149+
return "{} {} {}".format(bcolors.OKGREEN, text, bcolors.ENDC)
150+
151+
def error_str(text):
152+
return "{} {} {}".format(bcolors.FAIL, text, bcolors.ENDC)
153+
154+
def info_str(text):
155+
return "{} {} {}".format(bcolors.OKBLUE, text, bcolors.ENDC)
156+
157+
148158
def check_google_calendar_id(google_cal_id):
149159
"""utility to verify a google calendar id passed as a parameter.
150160

0 commit comments

Comments
 (0)