Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


OpenGemara.org's Compiler

This is the source code of the compiler behind OpenGemara.

The website is a primer on Talmud study, with translations and (coming slowly!) commentary. I write the text in a custom markdown dialect (close enough to the real thing so that my muscle memory works) with some custom additions. This program compiles (or transpiles, depending on your mood :) ) this markdown into JSON, to be parsed by my website builder into the final site.

The (contents) source directory looks something like this:






With each file having the following grammar:

[[Chapter 1]]
<<Q|There will be a question here>>
יש פה משהו מהמקור
This is a translation of the original [with comments in brackets] _and italics_ and *bold* and _italics and *bold and italics*_ [c][popup comments][text to show in popup comment] and [s][link to source][masechta.3a.linenum]. 
multiline comments go here, ` on a newline is a blank line, /*is a comment, won't appear in output*/
|~Cell11 (the tilde makes it a header) | ~Cell12 | ~Cell13|
|~Cell11 | Cell12  (no header here!) | Cell13|
[!][title text][image-url.jpg]
{Ths wrd} are purposefully misspelled.
<These words> are transliterated words, which will need a popup to translate.
<<A>> /* Defaults to: "The Gemara will answer" */
<<N|Just a comment>>

The compiler is broken up into two pieces - the server and the compiler (I set up the architecture in this way so to create live syntax and spellcheck with a Language Server plugin), so one must first start the server and then run the compiler in the source directory (Masechta in the above example).

It could benefit from a bit of refactoring, so ideas are always welcome!!