spenhos_obsidian-torah-vers.../CONTRIBUTING.md

3.4 KiB

Contributing to Torah Verse Inserter

Thank you for your interest in improving this plugin! Contributions of all kinds are welcome.

🐛 Reporting issues

The most valuable reports for this plugin:

  • Transliteration misses — you typed something like bereshit and it didn't find the Hebrew you expected. Please include: what you typed, what you expected to find, and the verse reference.
  • Book-name aliases — a book name or abbreviation in your language that the reference parser doesn't recognize (e.g. Dt 6:4 in your locale). Tell us the alias and your language.
  • Text issues — anything that looks wrong in the inserted Hebrew (nikud, te'amim, ketiv/qere). Please include the verse reference and a screenshot.
  • Translation issues — a Sefaria version that fails to load or renders oddly.

Open an issue with as much detail as you can.

🌍 Translations

The UI and README are localized in 7 languages (EN, ES, HE, AR, FR, RU, PT):

  • UI strings live in src/i18n.ts — one block per language.
  • README translations are the README_xx.md files.
  • Localized images are generated by tools/build-assets.mjs (edit the strings table, then run node tools/build-assets.mjs).

Corrections from native speakers are very welcome. To add a new language, add a block to all three places.

🛠️ Development setup

git clone https://github.com/spenhos/obsidian-torah-verse-inserter.git
cd obsidian-torah-verse-inserter
npm install
npm run build-corpus   # generates src/data/corpus.ts from tools/cache (required once)
npm run build          # type-check + bundle main.js
npm run lint           # eslint with Obsidian rules

To test locally, copy main.js, manifest.json and styles.css into <your-vault>/.obsidian/plugins/torah-verse-inserter/ and reload Obsidian.

Project layout

Path What it is
src/corpus.ts Lazy per-book gzip decompression of the bundled Tanakh
src/books.ts Book metadata (39 books), aliases, Sefaria refs, AlHaTorah links
src/refparse.ts Reference parser (Gen 1:1, bereshit 1:1-3, תהלים 23)
src/translit.ts Latin transliteration → Hebrew consonant pattern
src/search.ts Whole-Tanakh text search (Hebrew or transliteration)
src/hebrew.ts Strip/keep nikud & te'amim, font-compatibility normalization
src/sefaria.ts Translation versions list + fetch (online, optional)
src/modal.ts Search & insert modal (incl. on-screen alef-bet keyboard)
tools/fetch-corpus.mjs Downloads MAM from Sefaria (keeps the vocalized qere)
tools/build-corpus.mjs Packs tools/cache/*.jsonsrc/data/corpus.ts (gzip+base64)
tools/build-assets.mjs Generates the localized README images (SVG)

Text sources

The Hebrew text is Miqra according to the Masorah (MAM), fetched from Sefaria with a pinned version. src/data/corpus.ts is generated and intentionally not committed; CI regenerates it from the committed tools/cache before building.

📦 Releases

Releases are automated: bump the version in manifest.json, package.json and versions.json, then push a matching tag. GitHub Actions builds and publishes the release with main.js, manifest.json and styles.css.

📜 License

By contributing you agree that your contributions are licensed under the MIT License.