Code Monkey home page Code Monkey logo

sefaria-project's Introduction

New Interfaces for Jewish Texts

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.


Getting Started

Install dependencies using pip and virtualenv:

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.

Create a local settings file:

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.

Get mongod running:

If you don't already have it, install MongoDB. Then get it running:

monogod

Put some texts in your database:

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.

Set up Django's local server

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.

Run the development server:

python manage.py runserver

Exploring the Code

Some of the most important code is found in:

  • static/js/reader.js - JS for reader app
  • static/js/sheets.js - JS for source sheet builder
  • static/js/util.js - JS shared across apps
  • sefaria/texts.py - backend core for manipulating texts
  • sefaria/sheets.py - backend for source sheets
  • sefaria/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")

License

GPL

sefaria-project's People

Contributors

blockspeiser avatar markerdmann avatar kylehg avatar nqeron avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.