3.1.1 • Published 2 months ago

salat v3.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

Salat npm version

Description

Daily prayer time in all the cities in 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

Getting started

# Install

$ npm i -g salat

# Run with default city

$ salat

# Run with custom city

$ salat [cityName]

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

npx salat

City name should be provided the same way it's written in the cities.json

Output

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

screen 1 screen 2 screen 3

Dependecies

The code behind depends on :

  • axios to make an http request ( fetch the data).
  • jsdom to parse the html result.
  • chalk to avoid boring styles and colors.
  • node-localstorage to read and write from localstorage.

Change the default city

  • The default city is :heart: Marrakech :heart:, set as a value for the DEFAULT_CITY variable in ./constants.js

  • You can change it by replacing Marrakech by your city name according to the values from ./data/cities.json

Help

  • Please keep in mind that this is a work in progress in a very early stages, any help is appreciated and more than welcome.

  • If you think this piece of code is anyhow useful, please feel free to contribute, star :star::star: and share 🙏 🙏

Todo

  • Use a default city
  • Use localstorage-like api for caching purposes
  • Display execution time
  • Improve performance
  • Add unit tests
  • Add a documentation site
  • Command to set the default city
  • Command to display the list of available cities
  • Command to display the time table for the whole month

License

This project is under the MIT license.

Built With :heart: in Ramadan

3.0.3

2 months ago

3.1.1

2 months ago

3.0.2

2 months ago

3.1.0

2 months ago

3.0.1

2 months ago

3.0.0

2 months ago

2.0.2

4 months ago

0.2.10

4 years ago

0.2.9

5 years ago

0.2.8

5 years ago

0.2.7

5 years ago

0.2.6

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago