Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated the documentation #25

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
226 changes: 207 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,25 @@

> Daily prayer time in all the cities in [Morocco](https://www.google.com/search?q=morocco) :morocco:, directly in your terminal, at the tip of your fingers


**A stupid simple Command line utility to get the daily prayers time for all the citiy in Morocco**

The source of the data is [the Moroccan Ministery Website](http://www.habous.gov.ma)

## Getting started

```bash
npx salat [cityName]
```

Please note that if the cityName contains space of `'` you need to use quotes, example

```bash
npx salat "el jadida"
npx salat "L'msid"
```

You can also install it globally

```bash
# Install

Expand All @@ -25,33 +37,210 @@ $ salat
$ salat [cityName]
```

Alternatively, if you don't want to install it globally, you can just use:

```bash
npx salat
```

`City name should be provided the same way it's written in the cities.json`
This is an exhaustive list of the supported cities :

- Agadir
- Ahfir
- Ain Aouda
- Aïn Chaïr
- Ait El Kak
- Ait Ourir
- Akayouar
- Akdal Amelchil
- Akdez
- Akhefnir
- Akka
- Aknoul
- Akoudal Amelchil Midelt
- Amkala
- Amsmrir
- Araich
- Arbaoua
- Arfoud
- Asa
- Askin
- Asoul
- Assila
- Azemmour
- Azilal
- Azrou
- Bab Bared
- Ben Ahmed
- Ben Slimane
- Bengrir
- Beni Adrar
- Beni Ansar
- Beni Mellal
- Beni Tejit
- Berkane
- Berrchid
- Bir Anzaran
- Bir Kandour
- Bouanan
- Bouarfa
- Bouikra
- Bouizkaren
- Boujdour
- Boukrae
- Boulmane
- Boumalen Dadas
- Bourd
- Bouskoura
- Bouznika
- Casablanca
- Chefchaouan
- Chichaoua
- Dakhla
- Debdou
- Demnat
- Deryouche
- El Brouj
- El Gara
- El Hajeb
- El Jabha
- El Jadida
- El Kasba
- El Mahbes
- El Menzel
- Enif
- Erich
- Errachidia
- Essaouira
- Ezak
- Fem Lehsan
- Fem Zkid
- Ferkhana
- Fes
- Fezouane
- Figuig
- Fnideq
- Fquih Ben Salah
- Geltat Zamour
- Guelmim
- Guercif
- Hoceima
- Igherem
- Ikes
- Imelchil
- Imin Telat
- Imntanout
- Imouzzer Kandar
- Jerada
- Kalaat Megouna
- Kalaat Sraghna
- Kares
- Kariat Ba Mohammed
- Kasbah Tadla
- Katara
- Kelmima
- Kénitra
- Ketama
- Khemis Sidi Abd Jelil
- Khemis Zemamra
- Khémissat
- Khenifra
- Khouribga
- Ksar El Kebir
- Ksar El Sghir
- Ksar Ich
- L'msid
- Laayoune
- Laayoune Sidi Mellouk
- Lagouira
- Marrakech
- Martil
- Mediek
- Meknes
- Melilla
- Meskoura
- Metmata
- Midelt
- Misour
- Mohammedia
- Moulay Bouaza
- Moulay Bousselham
- Moulay Yacoub
- Nador
- Oualidia
- Ouazane
- Oued Amlil
- Oued Law
- Oued Zam
- Oujda
- Oulad Ayad
- Oulad Tayma
- Oulmes
- Ourzazate
- Ousered
- Rabat
- Ras Alma
- Remani
- Rhamna
- Ribate El Kheir
- Risani
- Safi
- Saïdia
- Sebta
- Sefrou
- Selouane
- Settat
- Sidi Benour
- Sidi Ghanem
- Sidi Ifni
- Sidi Kacém
- Sidi Slimane
- Sidi Yahya Gharb
- Smara
- Souq Arbiâ Gharb
- Tafntan
- Tafougalt
- Tafraouet
- Tahla
- Tahla
- Talouine
- Talsint
- Tamslouhet
- Tanger
- Tantan
- Taounat
- Taourirt
- Tarfaya
- Taroudant
- Tasltanet
- Tata
- Taza
- Tazarin
- Tefariti
- Temnar
- Tendrara
- Tenghir
- Tenjedad
- Tetouan
- Tiflet
- Tindit
- Tisa
- Tisenet
- Tizi Ousli
- Tiznit
- Toulkoult
- Yefrin
- Yousofia
- Zagoura
- Zaouiat Ahansal
- Zaouiat Moulay Ibrahim
- Zayou
- Zerhoune

## Output

```bash
# The programs prints to the console the prayers' time for the current day in the default city as shown bellow:
```

![screen 1](images/screenShot1.png)
![screen 2](images/screenShot2.png)
![screen 3](images/screenShot3.png)


## Dependecies

The code behind depends on :

- [axios](https://github.com/axios/axios) to make an http request ( fetch the data).
- [jsdom](https://github.com/jsdom/jsdom) to parse the html result.
- [chalk](https://github.com/chalk/chalk) to avoid boring styles and colors.
- [node-localstorage](https://github.com/lmaccherone/node-localstorage) to read and write from localstorage.

## Change the default city

- The default city is :heart: [Marrakech](https://www.google.com/search?q=marrakech) :heart:, set as a value for the `DEFAULT_CITY` variable in `./constants.js`
Expand All @@ -68,7 +257,6 @@ The code behind depends on :

- [x] Use a default city
- [x] Use localstorage-like api for caching purposes
- [x] Display execution time
- [ ] Improve performance
- [ ] Add unit tests
- [ ] Add a documentation site
Expand Down
Loading