Coder Social home page Coder Social logo

ryanfb / scaife-viewer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scaife-viewer/scaife-viewer

0.0 2.0 0.0 2.69 MB

new reading environment for version 5.0 of the Perseus Digital Library

License: MIT License

JavaScript 13.64% Shell 1.01% Python 37.41% XSLT 5.39% HTML 7.10% Vue 23.74% CSS 11.70%

scaife-viewer's Introduction

Scaife Digital Library Viewer

The Scaife Viewer is the new reading environment for the Perseus Digital Library.

See Ways to Contribute.

Getting Started

Requirements:

  • Python 3.6
    • pipenv
  • Node 8.6
  • PostgreSQL 9.6

First, set up a database to use for local development:

createdb scaife-viewer

This assumes your local PostgreSQL is configured to allow your user to create databases. If this is not the case you might be able to create the user yourself:

createuser --username=postgres --superuser $(whoami)

Install the Node and Python dependencies:

npm install
pipenv install --dev

To run commands in the Python environment, you can use pipenv shell and carry on, but I find it has some nasty side-affects. So, to activate the pipenv environment in your current shell:

source "$(pipenv --venv)/bin/activate"

Setup the database:

python manage.py migrate
python manage.py loaddata sites

Seed the text inventory to speed up local development:

curl -s "https://scaife-cts-dev.perseus.org/api/cts?request=GetCapabilities" > ti.xml

You should now be set to run the development server:

npm run dev

Browse to http://localhost:3000/.

Note that, although running Scaife locally, this is relying on the Nautilus server at https://scaife-cts-dev.perseus.org to retrieve texts.

Translations

Before you work with translations, you will need gettext installed.

macOS:

brew install gettext
export PATH="$PATH:$(brew --prefix gettext)/bin"

To prepare messages:

python manage.py makemessages --all

If you need to add a language; add it to LANGUAGES in settings.py and run:

python manage.py makemessages --locale <lang>

scaife-viewer's People

Contributors

brosner avatar jtauber avatar paltman avatar jacobwegner avatar

Watchers

Ryan Baumann 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.