https://github.com/omdxp/miracle
Read Quran and Get Info about Suar and Ajzaa
https://github.com/omdxp/miracle
gomodule quran
Last synced: about 1 year ago
JSON representation
Read Quran and Get Info about Suar and Ajzaa
- Host: GitHub
- URL: https://github.com/omdxp/miracle
- Owner: omdxp
- License: mit
- Created: 2022-08-14T19:52:18.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-10-25T16:48:40.000Z (over 3 years ago)
- Last Synced: 2024-05-31T15:30:11.192Z (about 2 years ago)
- Topics: gomodule, quran
- Language: Go
- Homepage: https://omdxp.github.io/miracle-docs/
- Size: 1.3 MB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-islamic-open-source-apps - miracle
README
miracle
Read Quran and Get Info about Suar and Ajzaa
[](https://github.com/Omar-Belghaouti/miracle/actions?query=branch%3Amain)
## Installation
- Install the gomodule package with:
```bash
go get -u github.com/Omar-Belghaouti/miracle
```
- Or import the package in your project:
```go
import "github.com/Omar-Belghaouti/miracle"
```
And run:
```bash
go mod tidy
```
## Quick Start
```go
package main
import (
"fmt"
"log"
"github.com/Omar-Belghaouti/miracle"
"github.com/Omar-Belghaouti/miracle/ajzaa"
"github.com/Omar-Belghaouti/miracle/suar"
)
func main() {
quran := miracle.Book()
quran.SetLanguage("en")
surah, err := quran.ReadSurah(suar.AAL_IMRAN)
if err != nil {
log.Fatal(err.Error())
}
fmt.Println(surah.Name)
for k, v := range surah.Verse {
fmt.Printf("%s: %s\n", k, v)
}
juz, err := quran.GetJuzInfo(ajzaa.JUZ_19)
if err != nil {
log.Fatal(err.Error())
}
fmt.Println(juz.Start)
surahInfo, err := quran.GetSurahInfo(suar.AL_ADIYAT)
if err != nil {
log.Fatal(err.Error())
}
fmt.Println(surahInfo.Title)
}
```
## Documentation
Check the documentation [website](https://omdxp.github.io/miracle-docs/) for more information.