ccil-kbw / robot

mdroid: Masjid's droid
https://ccil-kbw.github.io/
BSD 3-Clause "New" or "Revised" License
6 stars 0 forks source link

feat: read iqama and adhan times from the CSV #29

Closed serafdev closed 5 months ago

serafdev commented 5 months ago

In this Pull Request I'm adding the capability to read Today's time directly from the CSV to remove external dependencies.

To test:

go test -v -cover ./...

To run the code:

go run ./cmd/cli/main.go

You should directly see this output:

robot on  feat/shell-prettier
❯ go run ./cmd/cli/main.go
+------------+---------+---------+---------+---------+---------+
| DATE       | FAJR    | DHUHUR  | ASR     | MAGHRIB | ISHA    |
+------------+---------+---------+---------+---------+---------+
| 04/11/2024 | 5:15 am | 1:15 pm | 6:15 pm | 7:38 pm | 9:02 pm |
+------------+---------+---------+---------+---------+---------+

That CLI (./cmd/cli/main.go) is calling the GetShellPettrified which in return calls GetTodayTime from the v2/csv package