Commite Code

This commit is contained in:
2025-08-20 09:47:42 +07:00
parent 066cecfad9
commit 7e99b228f5
47 changed files with 5279 additions and 0 deletions

21
Moodle/Tools/entovi.sh Normal file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
# Tìm tất cả các tệp có tên kết thúc bằng .en.vtt nhưng không phải *.en.en.vtt hoặc *.vi.vi.vtt
find . -type f -name "*.en.vtt" ! -name "*.en.en.vtt" ! -name "*.vi.vi.vtt" -print0 | while IFS= read -r -d $'\0' file; do
# Lấy phần tên tệp trước .en.vtt
base_name=$(basename "$file" .en.vtt)
# Lấy thư mục chứa tệp
dir_name=$(dirname "$file")
# Tạo đường dẫn đầy đủ cho tệp đích
destination_file="${dir_name}/${base_name}.vi.vtt"
# Sao chép tệp
cp "$file" "$destination_file"
# In thông báo
echo "Đã sao chép: \"$file\" thành \"$destination_file\""
done
echo "Hoàn tất quá trình sao chép."