mirror of
https://github.com/thegeneralist01/twitter-openapi
synced 2026-01-11 15:40:26 +01:00
add tqdm
Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
parent
5007b97d01
commit
d5ccc25869
1 changed files with 4 additions and 2 deletions
|
|
@ -7,6 +7,7 @@ import copy
|
||||||
import re
|
import re
|
||||||
from build_config import Config
|
from build_config import Config
|
||||||
from hooks import OpenapiHookBase, RequestHookBase
|
from hooks import OpenapiHookBase, RequestHookBase
|
||||||
|
from tqdm import tqdm
|
||||||
|
|
||||||
|
|
||||||
print("=== Build Start ===")
|
print("=== Build Start ===")
|
||||||
|
|
@ -20,7 +21,7 @@ try:
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
for lang in config.main().keys():
|
for lang in tqdm(config.main().keys(), leave=False):
|
||||||
dist_replace = lambda x: x.replace(
|
dist_replace = lambda x: x.replace(
|
||||||
config.INPUT_DIR, config.OUTPUT_DIR.format(lang), 1
|
config.INPUT_DIR, config.OUTPUT_DIR.format(lang), 1
|
||||||
)
|
)
|
||||||
|
|
@ -29,7 +30,8 @@ for lang in config.main().keys():
|
||||||
os.makedirs(dist_replace(dir), exist_ok=True)
|
os.makedirs(dist_replace(dir), exist_ok=True)
|
||||||
|
|
||||||
paths = {}
|
paths = {}
|
||||||
for file in glob.glob(os.path.join(config.INPUT_DIR, "**/*.yaml")):
|
files = glob.glob(os.path.join(config.INPUT_DIR, "**/*.yaml"))
|
||||||
|
for file in tqdm(files, leave=False):
|
||||||
file = file.replace(os.path.sep, "/")
|
file = file.replace(os.path.sep, "/")
|
||||||
with open(file, mode="r", encoding="utf-8") as f:
|
with open(file, mode="r", encoding="utf-8") as f:
|
||||||
load = yaml.safe_load(f)
|
load = yaml.safe_load(f)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue