Add shared config and update tool scripts

This commit is contained in:
Pawel
2026-05-25 07:07:13 -04:00
parent f46ff5d9b0
commit 8ee1f8de25
8 changed files with 196 additions and 150 deletions

View File

@@ -28,14 +28,7 @@ from urllib.parse import urlparse, parse_qs
from youtube_transcript_api import YouTubeTranscriptApi
# -------------------------
# Language mapping
# -------------------------
LANG_MAP = {
"jp": "ja",
"es": "es",
}
from anki_common import TRANSCRIPT_LANG_MAP
# Small starter stopword lists (you can grow these over time)
STOPWORDS = {
@@ -160,7 +153,7 @@ def main() -> int:
)
args = parser.parse_args()
lang_code = LANG_MAP[args.lang]
lang_code = TRANSCRIPT_LANG_MAP[args.lang]
video_id = extract_video_id(args.video)
try:
@@ -196,4 +189,3 @@ def main() -> int:
if __name__ == "__main__":
raise SystemExit(main())