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.
You can post bugs or request/discuss features on GitHub Issues. Tackling an issue marked as a "Starter Project" is a good way to sink your teeth into Sefaria.
Our complete list of development tasks is stored on our Engineering WorkFlowy. If you're interested in working on a project you see listed here, please email the sefara-dev mailing list.
If you don't already have them, install virtualenv and pip. Then use them to install the required Python packages.
virtualenv venv --distribute
source venv/bin/activate
pip install -r requirements.txt
Now you should see (venv)
in front of your command prompt. The second 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 third command.
cd sefaria
cp local_settings_example.py local_settings.py
vim 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. The data dump included in Sefaria-Data requires MongoDB version 2.2 or later. To get Mongo running:
mongod
A MongoDB dump of our database is available via DropBox. You can find it link from our Sefaria-Data repo. Place the dump
directory within Sefaria-Data
, then:
cd Sefaria-Data
mongorestore --drop
This will create (or overwrite) a mongo database called sefaria
.
manage.py
is used to run and to manage the local server. Is is located in the root directory of the Sefaria-Project
code base.
Django auth features run on a seperate database. To init this database and set up Django's auth system, switch to the root directory of the Sefaria-Project
code base, and run:
python manage.py syncdb
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")