rick commited on
Commit
2fc3ad2
·
unverified ·
1 Parent(s): 1149133

start the dream...

Browse files
Files changed (1) hide show
  1. scripts/gen_ui_lang_support.py +11 -3
scripts/gen_ui_lang_support.py CHANGED
@@ -5,7 +5,8 @@ from os import getenv
5
  from typing import Optional, Any, Union
6
  import re
7
  import json
8
-
 
9
 
10
  from openai import OpenAI
11
 
@@ -142,5 +143,12 @@ if __name__ == "__main__":
142
  if type(JSON_UI_LANG_SUPPORT) == str:
143
  JSON_UI_LANG_SUPPORT.encode()
144
 
145
-
146
-
 
 
 
 
 
 
 
 
5
  from typing import Optional, Any, Union
6
  import re
7
  import json
8
+ import time
9
+ import datetime
10
 
11
  from openai import OpenAI
12
 
 
143
  if type(JSON_UI_LANG_SUPPORT) == str:
144
  JSON_UI_LANG_SUPPORT.encode()
145
 
146
+ # timestamp string format : "MM-DD-YYYY_HH-MM-SS"
147
+ timestamp = datetime.datetime.now().strftime("%m-%d-%Y_%H-%M-%S")
148
+ with open(f"ui_lang_support_{timestamp}.json", "wb") as output_file:
149
+ output_file.write(JSON_UI_LANG_SUPPORT)
150
+ output_file.close()
151
+
152
+ # print GREEN FG : "Success and Done !" message
153
+ print("\033[92mSuccess and Done !\033[0m")
154
+ exit(0)