• Stars
    star
    112
  • Rank 311,352 (Top 7 %)
  • Language
    PHP
  • License
    GNU General Publi...
  • Created over 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Various tools for Parsing Quran Tajweed, Buck, etc.

بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ

Quran Tools for Parsing Tajweed and Buck

These PHP tools are to be used with the AlQuran.cloud and GlobalQuran.com APIs. They are made available so you may get the most out of the APIs.

There's a React equivalent of this package @ https://github.com/aamirbhat382/Tajweed.

What do they contain

For now, a Tajweed and Buck helper. Each section is detailed below.

Install and Get Started

The tools add developer libraries you can use in your application. Install using composer:

composer require alquran/tools

Tajweed Example

To get tajweed text to become legible, use:

<?php
require_once('vendor/autoload.php');

$parser = new \AlQuranCloud\Tools\Parser\Tajweed();
$html = $parser->parse($text); // $text is the output text of a Verse from quran-tajweed edition. For example: http://api.alquran.cloud/ayah/24:35/quran-tajweed. Also see data/tajweed.json.

Buckwalter Transliteration example

To get tajweed text to become legible, use:

<?php
require_once('vendor/autoload.php');

$parser = new \AlQuranCloud\Tools\Parser\Buck();
$arabic = $parser->toArabic($text); // $text is the output text of a Verse from quran-buck edition. For example: http://api.alquran.cloud/ayah/24:35/quran-buck.

Tajweed Documentation

See Tajweed Documentation.

Buck (Buckwalter Transliteration) Documentation

See Buck Documentation.

Are there any known Issues

Yes, with the Tajweed parser. Webkit has a known bug that breaks Arabic with inline tags. There is an experimental fix in the Tajweed Parse class for this using the Zero Width Joiner (‍), but it still needs some work. I've manually tried this on some Ayahs and ZWJ is not smart enough to parse all the characters and join them properly, so this is not ideal. See See https://stackoverflow.com/questions/11155849/partially-colored-arabic-word-in-html and https://bugs.webkit.org/show_bug.cgi?id=6148. The issue with parsing in Chrome seems to have been resolved with Chrome's new layout implementation (https://www.chromium.org/blink/layoutng). It has been tested on version 77.0.3865.90.

Credits

Most of this code is created using logic from the Global Quran website and codebase.

More Repositories

1

alquran.cloud

Web App that powers https://alquran.cloud
HTML
315
star
2

api.alquran.cloud

The AlQuran.Cloud API - https://alquran.cloud/api
PHP
227
star
3

api.aladhan.com

The AlAdhan API
PHP
122
star
4

prayer-times

An Islamic Prayer Times Library written in PHP. It performs the core calculations for the AlAdhan API @ https://aladhan.com.
PHP
63
star
5

aladhan.com

The AlAdhan.com website and app
HTML
51
star
6

alquran-api-client-php

A PHP API Client for the AlQuran.cloud REST API
PHP
10
star
7

aladhan-api-client-php

PHP Client for Prayer Times using the AlAdhan.com API
PHP
10
star
8

api.alquran.cloud-db

Dockerfile
9
star
9

waf

The Islamic Network WAF
PHP
8
star
10

prayer-times-moonsighting

A prayer times library to calculate Fajr and Isha timings per moonsighting.com
PHP
7
star
11

marifa.org

Code for Marifa.org - Metaphysical Truths and Quotes
JavaScript
6
star
12

alquran-apidotnet-client

An AlQuran DotNet API Client
C#
5
star
13

alquran-api-client-node

TypeScript
5
star
14

aladhan-api-jquery-plugin

A Jquery Plugin to get Prayer Times
JavaScript
4
star
15

islamic-calendar

A library to calculate Islamic Dates
PHP
3
star
16

openapi

OpenAPI Specifications for Islamic Network APIs
HTML
3
star
17

islamic-apps-docker

Docker Container for AlAdhan.com and AlQuran.cloud
Dockerfile
3
star
18

cdn

CDN Setup
Shell
3
star
19

qibla-direction

Calculates the angle of the Qibla from a given pair of co-ordinates.
PHP
3
star
20

islamic.network

HTML
3
star
21

quran-line-by-line

A line by line text rendition of the Qur'an for the Al Quran API
PHP
2
star
22

alquran-word

Printable Qur'an Al Kareem
Rich Text Format
1
star
23

alquran-api-golang-client

A Golang client for the AlQuran API
1
star
24

php74

Dockerfile
1
star
25

php72

Dockerfile
1
star
26

everyayah.com-audio-scraper

PHP script to scrape audio from everyayah.com
PHP
1
star
27

cdn.aladhan.com

JavaScript
1
star
28

api.aladhan.com-db

TSQL
1
star
29

sermons.islamic.network

The sermons portal and API
HTML
1
star