Sefaria is creating interfaces, apps (like a source sheet builder) and infrastructure (like an API and a structured dataset) for Jewish texts and textual learning. Our demo is up at www.sefaria.org.
You can find outputs of our entire database in Sefaria-Data.
Interested developers should join the sefara-dev mailing list.
For general discussion about the project, please post to the Sefaria Forum.
If you don't already have them, install virtualenv and pip. Then use them to install the required Python packages.
$ virtualenv venv --distribute
$ pip install -r requirements.txt
$ source venv/bin/activate
Now you should see (venv)
in front of your command prompt. The third command sets your shell to use the Python virtual environment that you've just created. This is something that you have to run everytime you open a new shell and want to run the Sefaria demo. You can always tell if you're in the virtual environment by checking if (venv)
is at the beginning of your command prompt. If for some reason you don't want to use virtualenv, just run the second command.
cd sefaria
cp local_settings_example.py local_settings.py
vim/nano/subl/mate local_settings.py
Replace the placeholder values with values with those matching your enviornment. Choose a name for you local database (sefaria
will be the default created by mongorestore
below). You can leave SEFARIA_DB_USER
ad SEFARIA_DB_PASSWORD
blank if you don't need to run authentication on mongo.
If you don't already have it, install MongoDB. Then get it running:
monogod
A MongoDB dump of our database is included in the separate Sefaria-Data repo. Once you've cloned this repo you can:
cd Sefaria-Data
mongorestore
This will create (or overwrite) a mongo database called sefaria
.
If you plan to work on any of the account features, you'll need to run:
python manage.py syncdb
to set up Django's authentication system.
python manage.py runserver
Some of the most important code is found in:
static/js/reader.js
- JS for reader appstatic/js/sheets.js
- JS for source sheet builderstatic/js/util.js
- JS shared across appssefaria/texts.py
- backend core for manipulating textssefaria/sheets.py
- backend for source sheetssefaria/history.py
- revision history for texts
texts.py
can be used as a standalone interface to texts or for testing:
cd sefaria
python -i texts.py
>>> get_text("Kohelet 4:9")