Hadith Lookup

by Adnan Mukhtar
5
4
3
2
1
Score: 35/100

Description

Category: Learning & Knowledge Management

The Hadith Lookup Plugin enables users to retrieve and insert Quranic verses and Hadiths into their notes through the Hadith Unlocked API using specified reference IDs. Users can select reference text in their notes and utilize the command palette to fetch corresponding content, which replaces the reference. Additionally, template customization allows for precise and formatted insertions.

Reviews

No reviews yet.

Stats

9
stars
351
downloads
0
forks
383
days
55
days
55
days
2
total PRs
0
open PRs
0
closed PRs
2
merged PRs
2
total issues
2
open issues
0
closed issues
0
commits

Latest Version

README file from

Github

hadith-lookup-plugin

An Obsidian plugin that uses selected text as a reference ID to lookup and insert Quran and Hadith text and translation using the Hadith Unlocked API.

Usage

  • Within Obsdian, find and install the plugin from the Community plugins
  • Within your Obsidian Note, type in a Hadith Unlocked reference ID, e.g. quran:2:255 or bukhari:99, ideally on a new line
  • Select the reference text you typed-in ealier
  • Open the Obsidian Command palette and search for "Fetch Hadith"
  • The reference text will be replaced by the content of that reference from Hadith Unlocked

References

There are two types of references you can use with this plugin:

Quran: Single Āyah or a Range

  • quran:2:255
  • quran:baqarah:255
  • quran:3:190-194
  • quran:ta-ha:9-15
  • etc.

Hadith

  • bukhari:99
  • muslim:1
  • muslim:8a
  • etc.

Hadith Book IDs

The Book IDs you can use for Hadith references are the ones available on Hadith Unlocked. There are several books available. Browser the aḥādīth within the books and use the ID found in the browser URL. The ones currently available are:

  • The two authentics: bukhari, muslim
  • The four sunans: nasai, abudawud, tirmidhi, ibnmajah
  • The additional: ahmad, darami, hakim, ibnhibban, tabarani, nasai-kubra, bayhaqi
  • The comprehensive: suyuti
  • and more

Customization of replacement blocks

By default, the Obsidian Callout format is used to replace the reference with the contents from the Hadith Unlocked API. The API returns a JSON array as a response and the first element of the array is the referenced hadith.

The default Callout templates found in the plugin Settings can be customized as needed. The template should contain the JavaScript object-notation surrounded by {} to access different values from the response JSON.

For example, {result[0].body_en} in the Settings template would be replaced by the contents of the following JSON:

[ 
  { 
	"body_en": "Some value"
  } 
]

See the example JSON respones of Hadith Unlocked for the following references:

Default replacement templates

  • Quran (Single Āyah)
> [!note]
> {result[0].chapter.title} {result[0].num_ar} - {result[0].body}
> 
> [[{result[0].chapter.title_en} {result[0].num}]] - {result[0].body_en}
  • Quran (Āyah Range / Passage)
> [!note]
> {result[0].chapter.title} {result[0].num_ar} - {result[0].body}
> 
> [[{result[0].chapter.title_en} {result[0].num}]] - {result[0].body_en}
  • Hadith
> [!tip] {result[0].title_en}
> {result[0].book_shortName} {result[0].num} - {result[0].chain}
> {result[0].body} 
> {result[0].footnote} – {result[0].grade.grade} ({result[0].grader. shortName})
> 
> [[{result[0].book_shortName_en} {result[0].num}]] - {result[0].chain_en}
> {result[0].body_en}
> {result[0].footnote_en} – {result[0].grade.grade_en} ({result[0].grader. shortName_en})

My Personal Tempaltes:

  • Quran (Single Āyah)
**Quran: {result[0].title_en}**
- ~~﴿{result[0].body} ۝ ﴾ ([{result[0].chapter.title} {result[0].num_ar}](https://hadithunlocked.com/{result[0].ref}))~~
> > {result[0].body_en}

  • Quran (Āyah Range / Passage)
**Quran: {result[0].title_en}**
- ~~﴿{result[0].body}﴾ ([{result[0].chapter.title} {result[0].num_ar}](https://hadithunlocked.com/{result[0].ref}))~~
> > {result[0].body_en}

  • Hadith
**Hadith: {result[0].title_en}**
- ~~«{result[0].body}» ([{result[0].book_shortName} {result[0].num_ar}](https://hadithunlocked.com/{result[0].ref}) {result[0].grade_grade})~~
> > {result[0].body_en}

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
Bible Reference
5 years ago by tim-hub
Take Bible Study notes easily in the popular note-taking app Obsidian, with automatic verse and reference suggestions.
Bible sidecar
a year ago by Janis Ringli
This repository contains a plugin for obsidian that lets you view the bible in a sidebar within obsidian.
Bibtex Entry View
10 months ago by Kyoungdeuk
Load the bibtex entry of a given bibkey from a given bib file and show the entry in the code block of bibkey.
External Links
2 years ago by Juan Vimberg
LDS Scriptures Reference
3 years ago by pacokwon
Link LDS Scriptures & General Conference Talks in Your Obsidian Notes!
LiteCite
9 months ago by ras0q
A lightweight Obsidian plugin that creates citation notes from a BibTeX / BibLaTeX file
Noor
2 years ago by MKSherbini
Pandoc Reference List
4 years ago by mgmeyers
Display a formatted reference in Obsidian's sidebar for each pandoc citekey in the active document.
Perplexity Converter
2 years ago by Henrik Seidel
This plugin fixes sources (citations, Quellen) and their links in text pasted from Perplexity.
Quran Helper
2 years ago by Ammar Alakkad
Obsidian plugin to find and insert any Quran Ayah (verse) in your notes
Quran Lookup
4 years ago by Abu Ibrahim
Retrieve Quran verses in Obsidian.md easily with this simple text replacement plugin
Reference Map
3 years ago by Anoop K. Chandran
Reference and citation map for literature review and discovery
Wikipedia
5 years ago by Jonathan Miller
Grabs information from Wikipedia for a topic and brings it into Obsidian notes
ZotLit
3 years ago by AidenLx
A third-party project that aims to facilitate the integration between Obsidian.md and Zotero, by providing a set of community plugins for both Obsidian and Zotero.