-
Notifications
You must be signed in to change notification settings - Fork 0
/
quran.py
72 lines (61 loc) · 1.7 KB
/
quran.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import sqlite3
conn = sqlite3.connect('qurankurdish.db')
# For finding an unknown db headers
##cur = conn.cursor()
##
##cur.execute("SELECT name FROM sqlite_master WHERE type='table'")
##rows = cur.fetchall()
##for row in rows:
## print(row[0])
"""
sqlite_sequence
quran_corpus
bywords
tafaseer
sora
audio
aya
surah_name
quran
stocks
"""
# Parse the translation_raman
cur = conn.cursor()
cur.execute("SELECT translation_raman FROM quran")
rows = cur.fetchall()
for row in rows:
for text in row:
with open('translation_raman.txt', 'a', encoding='utf-8') as f:
f.write(str(text) + '\n')
# Parse the translation_puxta
cur = conn.cursor()
cur.execute("SELECT translation_puxta FROM quran")
rows = cur.fetchall()
for row in rows:
for text in row:
with open('translation_puxta.txt', 'a', encoding='utf-8') as f:
f.write(str(text) + '\n')
# Parse the translation_asan
cur = conn.cursor()
cur.execute("SELECT translation_asan FROM quran")
rows = cur.fetchall()
for row in rows:
for text in row:
with open('translation_asan.txt', 'a', encoding='utf-8') as f:
f.write(str(text) + '\n')
# Parse the translation_sanahi
cur = conn.cursor()
cur.execute("SELECT translation_sanahi FROM quran")
rows = cur.fetchall()
for row in rows:
for text in row:
with open('translation_sanahi.txt', 'a', encoding='utf-8') as f:
f.write(str(text) + '\n')
# Parse the quran_arabic
cur = conn.cursor()
cur.execute("SELECT quran_arabic FROM quran")
rows = cur.fetchall()
for row in rows:
for text in row:
with open('quran_arabic.txt', 'a', encoding='utf-8') as f:
f.write(str(text) + '\n')