quran-json/README.md

185 lines
4.6 KiB
Markdown
Raw Normal View History

2022-04-26 14:12:16 +02:00
# The Qur'an
2022-06-17 10:37:57 +02:00
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.
2022-04-26 14:12:16 +02:00
## Layout
2022-04-26 21:34:37 +02:00
### The `src/` directory
2022-04-26 14:12:16 +02:00
2022-04-26 21:34:37 +02:00
The [src/arabic/](src/arabic/) directory contains The Qur'an in its original Arabic. <br>
2022-06-17 10:37:57 +02:00
The [src/english/](src/english/) directory contains an English translation of The Qur'an. <br>
The [src/farsi/](src/farsi/) directory contains a Farsi translation of The Qur'an. <br>
The [src/portuguese/](src/portuguese/) directory contains a Portuguese translation of The Qur'an.
2022-04-26 21:34:37 +02:00
#### Arabic
* [src/arabic/](src/arabic/)
2022-04-26 14:12:16 +02:00
Each JSON file represents a chapter, or surah - in its original Arabic.
2022-06-17 10:37:57 +02:00
For example, [src/arabic/1.json](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.
2022-04-26 14:12:16 +02:00
For example:
```
[
[
<verse number>,
<verse contents>
],
[
<verse number>,
<verse contents>
],
[
<verse number>,
<verse contents>
],
/* etc... */
]
```
2022-04-26 21:34:37 +02:00
#### English
2022-04-26 14:12:16 +02:00
2022-04-26 21:34:37 +02:00
* [src/english/](src/english)
2022-04-26 14:12:16 +02:00
2022-04-26 22:07:25 +02:00
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](src/english/1.json)):
2022-04-26 14:12:16 +02:00
```
[
[
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. "
]
]
```
2022-06-17 10:37:57 +02:00
#### Farsi
* [src/farsi/](src/farsi/)
Each JSON file represents a chapter, or surah - as a Farsi translation.
For example, [src/farsi/1.json](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
* [src/portuguese/](src/portuguese/)
Each JSON file represents a chapter, or surah - as a Portuguese translation.
For example, [src/portuguese/1.json](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... */
]
```
2022-04-26 21:34:37 +02:00
## The `bin/` directory
2022-06-20 18:35:16 +02:00
The [bin/](bin/) directory contains four scripts that generate the
2022-04-26 21:34:37 +02:00
contents of the [src/](src/) directory:
* [bin/pull-arabic](bin/pull-arabic) <br>
This script is responsible for populating [src/arabic/](src/arabic/).
* [bin/pull-english](bin/pull-english) <br>
This script is responsible for populating [src/english/](src/english/).
2022-06-17 10:37:57 +02:00
* [bin/pull-farsi](bin/pull-farsi) <br>
This script is responsible for populating [src/farsi/](src/farsi/).
* [bin/pull-portuguese](bin/pull-portuguese) <br>
This script is responsible for populating [src/portuguese/](src/portuguese/)
2022-04-26 21:34:37 +02:00
**Notes**
The scripts are written in [Ruby v3.1.0+](https://www.ruby-lang.org). <br>
The ["pull-english"](bin/pull-english), ["pull-farsi"](bin/pull-farsi) and
["pull-portuguese"](bin/pull-portuguese) scripts depend on the ["pull-arabic"](bin/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.
2022-04-27 01:57:03 +02:00
## Download
For those of you who don't have access to, or know how to use "git",
2022-06-19 00:21:48 +02:00
a zip file of the repository is provided for download: [download zip file](https://github.com/ReflectedLight/The-Qur-an/archive/refs/tags/v0.3.0.zip).
2022-04-27 01:57:03 +02:00
2022-04-26 21:34:37 +02:00
## Credit, and thanks
2022-04-26 14:12:16 +02:00
2022-04-26 22:07:25 +02:00
The content of the [src/](src/) directory was automatically generated
2022-04-26 21:34:37 +02:00
thanks to the following websites:
2022-04-26 14:12:16 +02:00
2022-04-26 21:34:37 +02:00
* 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.
2022-05-29 19:27:59 +02:00
## License
2022-06-17 10:37:57 +02:00
This software is released into the Public Domain.