bahai-browser
v0.6.1
Published
An app to browser the Bahá'í Writings and associated texts'
Downloads
6
Readme
bahai-browser
This web app is for browsing the Bahá'í Writings and related texts.
See the web app in action or see some videos introducing the app.
Please note that while the website is functioning, this code is currently under construction as we attempt to break up the constituent code into separate reusable repositories. The history of the project prior to construction is under the bahaiwritings project, but that project is now going to be reserved for the Bahá'í Writings only.
Although the TextBrowser project for which this repository includes content is open sourced under the MIT license (as is the specific JSON formatting (and schema and meta-data files) of this repository), the contents of this data repository are under their own licenses and their copyright is retained. The usage terms of the Baha'i Writings are described at http://www.bahai.org/legal. The Qur'an and Bible translations (Rodwell/Sale and the King James) as well as the notes of Sale and Rodwell are in the public domain. The Baha'i translation cross-references are under the MIT license. Lights of Guidance is under its own copyright as is the Collins bibliography.
Installation
npm install bahai-browser
To-dos
Waiting: It is hoped that the addition of these tables (which are Scriptures) can also be automatically generated from any possible future authoritative API
- Suggest API to Baha'i World Centre to automatically (and periodically) parse their texts into JSON here to ensure we have the most up-to-date and corrected translations
Integrate with Steven Phelps' inventory of the Writings; could add a single link to the metadata for whole works, but especially useful for the by-verse annotations (its links to musical interpretation of individual Hidden Words; of course, Bahai9.com could also link to them).
Make iframes responsive https://blog.theodo.com/2018/01/responsive-iframes-css-trick/
Use https://github.com/sapegin/shipit against a hidden config file to auto-deploy to https://bahai-browser.org
Customize which voices get used
Ability to bind plugin language dynamically at run-time rather than JSON, so any field can be translated
Add plugin using such as https://github.com/recogito/recogito-js for inline, and more range-flexible annotations, using adapter that works with W3C-standard Web Annotations; also is a validator.
- Could create a corresponding server, including possibly as a Mediawiki extension which provided a CRUD adapter for Web Annotations to/from MW API calls (including login) which allowed loading/updating content from within a wiki (or say a User subpage or maybe Wikidata) as the basis for the annotations. As wikidata can be federated, could have a dedicated user wiki for user annotations separate from a more formal, offical one for more general purpose data.
Use Wikidata.org language data to transform Arabic (or Persian) to root words for dictionary look-up (if not Wiktionary or Wikidata->Wikipedia->language link mapping, then any other free dictionary we might find)
Upon update completion have service worker read from the (latest section of)
CHANGES.md
Add more Cypress tests?
Add disableable "Powered by TextBrowser" message on non-results pages with link to that repo.
Break out plugins into separate repository(ies) for reusability with textbrowser (and publicize their presence on its wiki).
Make (modular) plugin schemas
Change wikilinks to be able to make post-load (CORS?) HEAD detection of
Last-Modified
as with BADIPagesCreatedLinks, so can style uncreated links in orange and make own cache; or to avoid multiple repeat requests, query a central cache (even an API toBADIPagesCreatedLinks
).Allow plugins to be reused multiple times with different metadata
Apply https://www.gnu.org/software/librejs/free-your-javascript.html labels to provide machine-automated detection of (open source) licenses.
ONGOING:
Once stabilized, target
TextBrowser
dependency by tagged version.Ensure
notextbrowser
branch is kept up to date withmaster
besides thepackage.json
and absent HTML/JavaScript/CSS differences.Ensure still passing tests/validating
Once
TextBrowser
version stabilizes, target "textbrowser" dependency by tagged version instead ofmaster
.
See TextBrowser to-dos
Fix tooltip when showing just 2 columns (Arabic goes too far to right)
Actually update
notextbrowser
branch and tag this version when stableAdd/change data files and meta-data files to use
$schema
?Fix TextBrowser so it can load with a port in
npm start
Change schema references (in both
bahaiwritings
branches) to point to absolute URLs so as to be independent of repository/branch (rather than their current assumption of being utilized withinTextBrowser
).Look at backlinks for templates like
{{pup|}}
to find the pages which reference a book, and then look for the heading above those quotes, so as to insert summary headings next to paragraphs as we do for the Kitáb-i-Aqdas indexes. Could also just use WhatLinksHere backlinks to include the title of the page on which it was cited.Add/Add back references for automated:
Synopsis, Roman numerals (pm, gwb), Chinese numbers, word-by-word translation (Persian/Arabic/German/English) with ruby-style annotations above the word and/or tooltip option, auto-romanized Persian (Baha'i-style with help link to http://bahai9.com/wiki/Pronunciation), Persian with English tooltips, English with Persian tooltips, text-to-(Google search, Google define, Wikipedia, bahai9.com edit pages); add Word-by-word/phrase mapping
Make a version for the Browser API to enable side-by-side views of (Bahai9.com) iframes dedicated to a given verse/paragraph!
Specific works - See bahaiwritings
Lower priority
- Add any other reasonable
browse_options
- Add "By page" for the Aqdas (once parsed by page)
- Further localization including column aliases, etc.
- Baha'i Bot for Discord?
- Idea for plugin to add links to a Calendar/Task API (no web standard yet apparently)
- Add any other reasonable
Testing
You will first need to run npm install
.
The syntax used in the tests currently only works in a modern browser. Note that this may lock up your terminal as the validator must load and process all of the files (including child files):
npm test
Note that the tests currently only perform schema validation. We do not yet have full UI tests though these can be run with:
npm run browser-test
If you merely wish to see the app running in a server, you can run:
npm run server
Background
For background of this project, see TextBrowser's History section.
Justification
While there was a letter from the international governing body of the Bahá'í Faith (online at http://bahai-library.com/uhj_interlinear_writings_cta), suggesting that interlinear publications are not necessary for the Bahá'í Writings, I do not think that this guidance pertains to our project for the following reasons:
The context appears to be more about official print publications which would need to justify resources being spent on such specialized text versions. The original question refers to Publishing Trusts and the response speaks of "all other readers" (besides those comparing with the Persian/Arabic originals) being distracted, whereas online, there are minimal (and non-official) resources being spent to provide the works, so there is no concern for distraction of other readers (and those using our TextBrowser-based tool can indeed selectively disable any column they wish).
Besides allowing those already familiar with English (or other translations) and Arabic/Persian, to confirm the original meaning, the availability of such interlinear tools allows for comparison by language learners who, although as per the letter, learning the original language is not required in the Bahá'í Faith, the learning of the original is very much praised as evident in the quotations at https://bahai9.com/wiki/Persian and https://bahai9.com/wiki/Arabic.
Our software tool is not confined to displaying translations multilinearly. For example, the version of the Qur'án herein included also provide notes which can be viewed interlinearly (from translators whose works were, at least for the time when translations into English were not as abundant, recommended for use or study by Bahá'ís), and study of such notes was even recommended by Shoghi Effendi. More such non-translation fields, including automated ones, are planned. And the tool can even be used for viewing merely the paragraph number and a single language of text. (While the notes of Rodwell were not recommended, and are indeed often antagonistic or skeptical of His Holiness Muhammad, they are provided largely for the sake of Biblical cross-references, and can be selectively omitted from view.)