Tafsir Resource
QUL supports exporting tafsir content in both JSON and SQLite formats.
Tafsir text may include <html> tags for formatting such as <b>,
<i>, etc.
Note:
Tafsir content may span multiple ayahs. QUL exports both the tafsir text and the ayahs it applies to.
Example JSON Format:
{
"2:3": {
"text": "tafisr text.",
"ayah_keys": ["2:3", "2:4"]
},
"2:4": "2:3"
}
- Keys in the JSON are
"ayah_key" in "surah:ayah", e.g. "2:3" means
3rd ayah of Surah Al-Baqarah.
- The value of ayah key can either be:
-
an object — this is the main tafsir group. It includes:
text: the tafsir content (can include HTML)
ayah_keys: an array of ayah keys this tafsir applies to
-
a string — this indicates the tafsir is part of a group. The string points to the
ayah_key where the tafsir text can be found.
SQLite exports includes the following columns
ayah_key: the ayah for which this record applies.
group_ayah_key: the ayah key that contains the main tafsir text (used for shared tafsir).
from_ayah / to_ayah: start and end ayah keys for convenience (optional).
ayah_keys: comma-separated list of all ayah keys that this tafsir covers.
text: tafsir text. If blank, use the text from the group_ayah_key.