csukuangfj commited on
Commit
81b786b
1 Parent(s): b9eb8e6

small fixes

Browse files
Files changed (2) hide show
  1. generate-tts-engine.py +7 -4
  2. generate-tts.py +7 -4
generate-tts-engine.py CHANGED
@@ -54,8 +54,12 @@ def generate_url(files: List[str]) -> List[str]:
54
  return ans
55
 
56
 
57
- def get_all_files(d: str, suffix: str) -> List[str]:
58
- ans = sorted(Path(d).glob(suffix), key=sort_by_apk, reverse=True)
 
 
 
 
59
  return list(map(lambda x: BASE_URL + str(x), ans))
60
 
61
 
@@ -129,8 +133,7 @@ at
129
 
130
 
131
  def main():
132
- apk = get_all_files("tts-engine", suffix="*.apk")
133
- apk += get_all_files("tts-engine-2", suffix="*.apk")
134
  to_file("./apk-engine.html", apk)
135
 
136
  # for Chinese users
 
54
  return ans
55
 
56
 
57
+ def get_all_files(d: List[str], suffix: str) -> List[str]:
58
+ files = []
59
+ for k in d:
60
+ files += list(Path(k).glob(suffix))
61
+
62
+ ans = sorted(files, key=sort_by_apk, reverse=True)
63
  return list(map(lambda x: BASE_URL + str(x), ans))
64
 
65
 
 
133
 
134
 
135
  def main():
136
+ apk = get_all_files(["tts-engine", "tts-engine-2"], suffix="*.apk")
 
137
  to_file("./apk-engine.html", apk)
138
 
139
  # for Chinese users
generate-tts.py CHANGED
@@ -54,8 +54,12 @@ def generate_url(files: List[str]) -> List[str]:
54
  return ans
55
 
56
 
57
- def get_all_files(d: str, suffix: str) -> List[str]:
58
- ans = sorted(Path(d).glob(suffix), key=sort_by_apk, reverse=True)
 
 
 
 
59
  return list(map(lambda x: BASE_URL + str(x), ans))
60
 
61
 
@@ -128,8 +132,7 @@ at
128
 
129
 
130
  def main():
131
- apk = get_all_files("tts", suffix="*.apk")
132
- apk += get_all_files("tts-2", suffix="*.apk")
133
  to_file("./apk.html", apk)
134
 
135
  # for Chinese users
 
54
  return ans
55
 
56
 
57
+ def get_all_files(d: List[str], suffix: str) -> List[str]:
58
+ files = []
59
+ for k in d:
60
+ files += list(Path(k).glob(suffix))
61
+
62
+ ans = sorted(files, key=sort_by_apk, reverse=True)
63
  return list(map(lambda x: BASE_URL + str(x), ans))
64
 
65
 
 
132
 
133
 
134
  def main():
135
+ apk = get_all_files(["tts", "tts-2"], suffix="*.apk")
 
136
  to_file("./apk.html", apk)
137
 
138
  # for Chinese users