Giter VIP home page Giter VIP logo

holy-books's Introduction

An Emacs interface to the Quran and the Bible: Org-mode links, tooltips, and Lisp look-ups

Let's use Org-mode links to look-up Quranic and Biblical verses!

“Live” examples & documentation: https://alhassy.github.io/holy-books/

Table of Contents

  1. Short Example
  2. Long Example
  3. Summary
    1. Installation Instructions
    2. Bye!

Short Example

img

Long Example

img

Summary

The full article may be read as —or visit the repo .

Link Action
quran:chapter:verse Retrive a verse from the Quran
bible:book:chapter:verse Retrive a verse from the Bible
[[basmala:]] Produce the Basmala ligature

These each take optional arguments separated by ‘|’; see and or see the full documentation online at .

There are also and to inject verses in the current Emacs buffer ;-)

Moreover, the Quran's translation and the Bible's version can both be selected…

‘holy-books-quran’ details
(documentation #'holy-books-quran)

Lookup a verse, as a string, from the Quran.

CHAPTER and VERSE are both numbers, referring to a chapter in the Quran
and a verse it contains.
In the associated Org link, both are treated as strings.

+ Lookups are stored in the variable ‘holy-books-quran-cache’ for faster reuse.
+ Quran lookup is based on https://quran.com .
+ Examples:

    ;; Get verse 2 of chapter 7 of the Quran
    (holy-books-quran 7 2)

    ;; Get English-Arabic name of 7th chapter
    (cl-getf (cl-getf holy-books-quran 7) :name)

The particular translation can be selected by altering the
HOLY-BOOKS-QURAN-TRANSLAITON variable.

--------------------------------------------------------------------------------

There is an Org link form: “quran:chapter:verse|color|size|no-info-p”
Only ‘chapter’ and ‘verse’ are mandatory; when ‘no-info-p’ is given,
the chapter and verse numbers are not mentioned in the resulting output.

Examples:
           quran:7:157|darkgreen|30px|t

           quran:7:157

For now, only Org HTML export is supported.

--------------------------------------------------------------------------------

Finally, there is also an HTML tooltip version with a captial ‘Q’;
it takes the same arguments but only the chapter and verse are actually used.
E.g. Quran:7:157 results in text “Quran 7:157” with a tooltip showing the verse.
‘holy-books-bible’ details
(documentation #'holy-books-bible)

Retrive a verse from the Christian Bible.

CHAPTER is a number.
VERSES is either a number or a string “x-y” of numbers.
BOOK is any of the books of the Bible, with ‘+’ instead of spaces!

Examples:

        (holy-books-bible "Deuteronomy" 18 "18-22")  ;; Lisp

        bible:Deuteronomy:18:18-22|darkblue   ;; Org-mode

        Bible:Deuteronomy:18:18-22            ;; Tooltip

There is also an Org HTML export link, “bible:book:chapter:verse”
sharing the same optional arguments and variations as the “quran:” link;
see the documentation of the method HOLY-BOOKS-QURAN for details.

The particular version can be selected by altering the
HOLY-BOOKS-BIBLE-VERSION variable.

Currently, Bible lookups are not cached and Quran lookups do not support the
“x-y” verse lookup style.

Possible books include:

 ;; Old Testament
 Genesis Exodus Leviticus Numbers Joshua Judges Ruth
 1+Samuel 2+Samuel 1+Kings 2+Kings 1+Chronicles 2+Chronicles Ezra
 Nehemiah Esther Job Psalms Proverbs Ecclesiastes Song+of+Solomon
 Isaiah Jeremiah Lamentations Ezekiel Daniel Hosea Joel Amos
 Obadiah Jonah Micah Nahum Habakkuk Zephaniah Haggai Zechariah
 Malachi
 ;; New Testament
 Matthew Mark Luke John Acts Romans 1+Corinthians 2+Corinthians
 Galatians Ephesians Philippians Colossians 1+Thessalonians
 2+Thessalonians 1+Timothy 2+Timothy Titus Philemon Hebrews James
 1+Peter 2+Peter 1+John 2+John 3+John Jude Revelation

For example, the following incantation yields the first verse of
the first chapter of each book.

   (s-join "

<hr>" (--map (holy-books-bible it 1 1) ’(...above list...)))

Installation Instructions

Manually or using quelpa:

;; ⟨0⟩ Download the holy-books.el file manually or using quelpa
(quelpa '(holy-books :fetcher github :repo
"alhassy/holy-books"))

;; ⟨1⟩ Have this always active in Org buffers
(add-hook #'org-mode-hook #'holy-books-mode)

;; ⟨1′⟩ Or use: “M-x holy-books-mode” to turn it on/off

;; ⟨2⟩ Configure the Quranic translation and Bible version
;;     Press ‘C-h o’ to get more info on each variable.
(setq holy-books-quran-translation "131"  ;; The Clear Quran
      holy-books-bible-version     "niv") ;; New International Version

Bye!

holy-books's People

Contributors

alhassy avatar ashfaqfarooqui avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.