bin | ||
src | ||
.gitignore | ||
.ruby-version | ||
gem.deps.rb | ||
README.md |
The Qur'an
This repository contains the holy book, The Qur'an, in its original Arabic and as translations in English, Farsi, and Portuguese - all of which are stored in the JSON format. It is hoped that through this repository those working with The Qur'an in the context of software will find a resource that's helpful to their work.
Layout
The src/
directory
-
The src/arabic/ directory contains The Qur'an in its original Arabic.
-
The src/english/ directory contains an English translation of The Qur'an.
-
The src/farsi/ directory contains a Farsi translation of The Qur'an.
-
The src/portuguese/ directory contains a Portuguese translation of The Qur'an.
Arabic
Each JSON file represents a chapter, or surah - in its original Arabic. For example, src/arabic/1.json contains Al-Fatihah. The structure of the file can be described as an array of arrays, with each array representing a verse, or ayah. For example:
[
[
<verse number>,
<verse contents>
],
[
<verse number>,
<verse contents>
],
[
<verse number>,
<verse contents>
],
/* etc... */
]
English
Each JSON file represents a chapter, or surah - as an English translation. The structure of the file can be described as an array of arrays, with each array representing a verse, or ayah. For example, consider the English translation of Al-Fatihah (src/english/1.json):
[
[
1,
"In the Name of Allah—the Most Compassionate, Most Merciful."
],
[
2,
"All praise is for Allah—Lord of all worlds,"
],
[
3,
"the Most Compassionate, Most Merciful,"
],
[
4,
"Master of the Day of Judgment."
],
[
5,
"You ˹alone˺ we worship and You ˹alone˺ we ask for help."
],
[
6,
"Guide us along the Straight Path,"
],
[
7,
"the Path of those You have blessed—not those You are displeased with, or those who are astray. "
]
]
Farsi
Each JSON file represents a chapter, or surah - as a Farsi translation. For example, src/farsi/1.json contains Al-Fatihah. The structure of the file can be described as an array of arrays, with each array representing a verse, or ayah. For example:
[
[
<verse number>,
<verse contents>
],
[
<verse number>,
<verse contents>
],
[
<verse number>,
<verse contents>
],
/* etc... */
]
Portuguese
Each JSON file represents a chapter, or surah - as a Portuguese translation. For example, src/portuguese/1.json contains Al-Fatihah. The structure of the file can be described as an array of arrays, with each array representing a verse, or ayah. For example:
[
[
<verse number>,
<verse contents>
],
[
<verse number>,
<verse contents>
],
[
<verse number>,
<verse contents>
],
/* etc... */
]
The bin/
directory
The bin/ directory contains four scripts that generate the contents of the src/ directory:
-
bin/pull-arabic
This script is responsible for populating src/arabic/. -
bin/pull-english
This script is responsible for populating src/english/. -
bin/pull-farsi
This script is responsible for populating src/farsi/. -
bin/pull-portuguese
This script is responsible for populating src/portuguese/
Notes
The scripts are written in Ruby v3.1.0+.
The "pull-english", "pull-farsi" and
"pull-portuguese" scripts depend on the "pull-arabic"
script being run first. The script dependencies can be installed by
running gem install -g gem.deps.rb
from the root of the repository.
Download
For those of you who don't have access to, or know how to use "git", a zip file of the repository is provided for download: download zip file.
Credit, and thanks
The content of the src/ directory was automatically generated thanks to the following websites:
- https://sacred-texts.com - for the original Arabic.
- https://quran.com - for the English translation.
- https://al-quran.cc - for the Farsi, and Portuguese translations.
License
This software is released into the Public Domain.