Fetch Prayer Times

by Ecys
5
4
3
2
1
Score: 53/100

Description

The Fetch Prayer Times plugin allows users to display daily Islamic prayer times directly within Obsidian. By connecting to the Aladhan API, it fetches accurate prayer schedules based on the user's chosen location. Users can customize which prayers to display, set update triggers (on vault startup or note opening), and format date and time displays to suit their preferences. The plugin supports 12-hour and 24-hour time formats as well as different date formats. With an intuitive settings interface, users can easily configure their city, select specific prayer times, and view a clean, table-style display of the daily prayer schedule within their Obsidian workspace.

Reviews

No reviews yet.

Stats

3
stars
292
downloads
1
forks
512
days
419
days
421
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
4
total issues
0
open issues
4
closed issues
20
commits

README file from

Github

Prayer Times Plugin for Obsidian

The Prayer Times Plugin fetches and displays daily prayer times in Obsidian. It uses the Aladhan API to ensure accurate schedules based on your chosen location. Customize the settings to match your preferences, and keep your workspace aligned with your daily schedule.

Features

  • Set Location: Choose your city manually or allow automatic detection.
  • Prayer Selection: Pick which prayer times (e.g., Fajr, Dhuhr) to display.
  • Update Options: Set updates to occur on vault startup, note opening, or both.
  • Custom Date Formats: Format dates to fit your style (e.g., MM/DD/YYYY).
  • Time Formats: Switch between 12-hour and 24-hour formats.
  • Clean Interface: Simple and easy-to-use settings.

Installation

  1. Download the plugin files or clone the repository.
  2. Copy the files to your Obsidian plugins folder, usually located in .obsidian/plugins inside your vault.
  3. Open Obsidian, then go to Settings > Community Plugins.
  4. Enable the Prayer Times Plugin.

Configuration

After enabling the plugin, configure the settings via Settings > Prayer Times:

  • City: Select your city to fetch accurate prayer times.
  • Prayers to Include: Choose specific prayers to display (e.g., Fajr, Maghrib).
  • Update Frequency: Specify if updates should happen on startup, note opening, or both.
  • Time Format: Switch between 12-hour or 24-hour formats.
  • Date Format: Customize how dates are displayed.

Usage

  1. Open the settings and configure your preferences.
  2. Save the settings. The plugin will automatically fetch and display prayer times.
  3. Use the Prayer Times section in your workspace to view the schedule.

Example Output

Date: 12/08/2024 Location: New York

Prayer Local Time Time (UTC)
Fajr 05:00 AM 10:00 AM
Dhuhr 12:15 PM 05:15 PM
Asr 03:45 PM 08:45 PM
Maghrib 06:10 PM 11:10 PM
Isha 07:30 PM 12:30 AM

Available Placeholders

Template Placeholders

When using custom templates, you can use these placeholders:

General
  • %city% — Your configured city name
Date
  • %YYYY% — Full year (2024)
  • %YY% — Short year (24)
  • %MM% — Month with leading zero (01-12)
  • %M% — Month without leading zero (1-12)
  • %DD% — Day with leading zero (01-31)
  • %D% — Day without leading zero (1-31)
  • %MMMM% — Full month name (January)
  • %MMM% — Month abbreviation (Jan)
  • %dddd% — Full day name (Monday)
  • %ddd% — Day abbreviation (Mon)
  • %date% — Full formatted date (January 15, 2024)
Prayer Times
  • %prayer% — Standard 12-hour time (5:23 AM)
  • %prayer_24h% — 24-hour time (05:23)
  • %prayer_utc% — UTC time in 12-hour format
  • %prayer_24h_utc% — UTC time in 24-hour format

Replace "prayer" with: fajr, sunrise, dhuhr, asr, maghrib, isha, midnight

Path Placeholders

When configuring the output location, you can use these date placeholders:

  • %YYYY% — Full year (2024)
  • %YY% — Short year (24)
  • %MM% — Month with leading zero (01-12)
  • %M% — Month without leading zero (1-12)
  • %DD% — Day with leading zero (01-31)
  • %D% — Day without leading zero (1-31)
  • %MMM% — Month abbreviation (Jan)
  • %MMMM% — Full month name (January)
  • %ddd% — Day abbreviation (Mon)
  • %dddd% — Full day name (Monday)

Example path: Notes/%YYYY%-%MM%/%DD%.md

Development

File Overview

  • apiHandler.ts: Handles requests to the Aladhan API.
  • settingsTab.ts: Implements the settings UI.
  • settings.ts: Manages and stores plugin settings.
  • main.ts: Initializes and integrates the plugin into Obsidian.
  • prayerTimesPlugin.ts: Contains the core logic for fetching and displaying prayer times.

Build and Test

  1. Install Node.js and TypeScript.
  2. Clone or extract the plugin files to a folder.
  3. Run npm install to set up dependencies.
  4. Build the plugin with npm run build.
  5. Copy the built files to the Obsidian plugins folder.
  6. Test the plugin in Obsidian to ensure proper functionality.

Contributing

Contributions are welcome. Fork the repository, make your changes, and submit a pull request.

License

This plugin is released under the MIT License.

Acknowledgments

This plugin connects to the Aladhan API to retrieve prayer times. Thank you to the Aladhan team for providing this valuable service.


If you encounter any issues or have suggestions, please contact the developer.

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
TimeStamper
4 years ago by Martin Eder
A plugin for Obsidian to quickly insert customized date- and time-stamps to the currently active note
Super Simple Time Tracker
4 years ago by Ellpeck
Multi-purpose time trackers for your notes!
WakaTime
3 years ago by WakaTime
Obsidian.md plugin for automatic time tracking and metrics generated from your Obsidian usage activity.
Obsidian-compatible Watcher for ActivityWatch
3 years ago by Grimmauld
Obsidian plugin to track user activity with ActivityWatch
RescueTime
3 years ago by Tatsuya Hayashi
A RescueTime integration plugin to view your activity logs in Obsidian.
Time Things
2 years ago by Nick Winters
Show clock, track time spent editing a note, and track the last time a note has been edited.
ManicTime
2 years ago by Finkit d.o.o.
Fastimer
2 years ago by vkostyanetsky
Intermittent fasting tracker plugin for Obsidian
Days Since
2 years ago by gndclouds
A plugin to show the number of days since a given date.
Progress Clocks
2 years ago by Nathan Clark
Progress clocks and other useful widgets for https://obsidian.md/.
Timekeep
2 years ago by Jacobtread
Obsidian task time tracking
Checkbox Time Tracker
2 years ago by UD
Checkbox Time Tracker for Obsidian
Relative Timestamps
2 years ago by Charles Young
Stopwatch
5 years ago by Tokuhiro Matsuno
Grandfather
5 years ago by Danny Hernandez
A simple Obsidian plugin to display the time and date on the status bar
Toggl Track
5 years ago by Maxime Cannoodt
A Toggl integration plugin for the popular knowledge base application Obsidian.
Flexible Pomodoro
4 years ago by grassbl8d
Focus Time
a year ago by AstraDev
Focus Time is a plugin that helps you track how much time you spend on each note.
Chronotyper
a year ago by BambusControl
Obsidian plugin for tracking note edit time
Wakatime / Wakapi
a year ago by Kevin Woblick
Connect your Obsidian to Wakatime or Wakapi to track the time spent while browsing or writing notes.
SolidTime Integration
a year ago by proniclabs
Obsidian SolidTime Integration Plugin
Countdown To
a year ago by Gui Cattani
A countdown/progress Obsidian widget using progressbar.js
TaskNotes
10 months ago by Callum Alpass
Task and time-tracking management with calendar integration for Obsidian
Lark Style CountDown Timer
5 months ago by Zhaoyang Yu
Tag Timer
4 months ago by quantavil
The Tag Timer is a versatile plugin for Obsidian that allows you to seamlessly track the time you spend on specific tasks or sections within your notes.
Timelog
4 months ago by Eddie Blundell
Time logging plugin for obsidian
Role Switch
2 months ago by Zafrem
Switch between different work roles (developer, writer, researcher, etc.) with intentional transitions and session tracking.