Skip to content

OmarAshour02/prayer-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prayers CLI

A command-line tool to check Islamic prayer times by city

Prayers CLI Preview

Features

  • Prayer times by city
  • Shows upcoming prayer
  • Time-based ASCII art (Morning, Night)
  • Cozy, eye-comfortable terminal style
  • Remembers your last configured city

Preview

Prerequisites

Make sure you have Go installed.

To verify Go is installed:

go version

Installation

# Clone the repo
git clone https://github.com/OmarAshour02/prayer-cli.git
cd prayer-cli
go build -o prayers

Option 1: Global install

# Move the binary to a directory in your PATH
sudo mv prayers /usr/local/bin/

Option 2: Run locally

cd prayer-cli
./prayers

Usage

After installation (assuming global installation), run:

prayers

This will fetch prayer times using default city "Makkah", unless you configure your selected city

Set or change your saved city

Use the --city or -c flag to set (or change) your default city:

prayers --city "Dublin"

Or shorthand:

prayers -c "Cairo"

Once set, the city will be remembered for future runs.

Set calculation method

Use the --method or -m flag to specify the Islamic prayer time calculation method:

prayers --method "2"

Or shorthand:

prayers -m "4"

Available calculation methods:

  • 0 - Jafari / Shia Ithna-Ashari
  • 1 - University of Islamic Sciences, Karachi
  • 2 - Islamic Society of North America
  • 3 - Muslim World League
  • 4 - Umm Al-Qura University, Makkah
  • 5 - Egyptian General Authority of Survey (Default)
  • 7 - Institute of Geophysics, University of Tehran
  • 8 - Gulf Region
  • 9 - Kuwait
  • 10 - Qatar
  • 11 - Majlis Ugama Islam Singapura, Singapore
  • 12 - Union Organization islamic de France
  • 13 - Diyanet İşleri Başkanlığı, Turkey
  • 14 - Spiritual Administration of Muslims of Russia
  • 15 - Moonsighting Committee Worldwide
  • 16 - Dubai (experimental)
  • 17 - Jabatan Kemajuan Islam Malaysia (JAKIM)
  • 18 - Tunisia
  • 19 - Algeria
  • 20 - KEMENAG - Kementerian Agama Republik Indonesia
  • 21 - Morocco
  • 22 - Comunidade Islamica de Lisboa
  • 23 - Ministry of Awqaf, Islamic Affairs and Holy Places, Jordan
  • 99 - Custom. See https://aladhan.com/calculation-methods

Combine flags

You can also combine both flags to set city and method together:

prayers -c "London" -m "3"

About

A command-line tool to check Islamic prayer times by city

Resources

License

Stars

8 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages