File size: 386 Bytes
3c6e2f1
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import json

with open("BACKEND/scripts/archive_surah_audio_mappings.json", "r", encoding="utf-8") as f:
    mappings = json.load(f)

for key in ['Maududi_Urdu', 'Maududi_English', 'Ibn_Kathir_Urdu']:
    with open(f"BACKEND/scripts/{key}.json", "w", encoding="utf-8") as out:
        json.dump(mappings[key], out, ensure_ascii=False, indent=2)

print("Dumped clean individual JSONs.")