One webpage for every book ever published!
Switch branches/tags
Clone or download
Latest commit b1223d9 Sep 25, 2018
Permalink
Failed to load latest commit information.
beta/static/styles (WIP) Saving feature/survey branch in progress Jul 14, 2017
conf Debug: In dev mode add viewport to all pages Sep 21, 2018
docker dd explanation for dev volume and bind mounts Sep 21, 2018
openlibrary v2 pages (only home page at current time) load non-render blocking JS Sep 24, 2018
provisioning Merge pull request #985 from cdrini/refactor/remove-couchdb-remnants Jun 26, 2018
scripts fixes ip stats via chmod +x perms Sep 9, 2018
static v2 pages (only home page at current time) load non-render blocking JS Sep 24, 2018
tests Add basic manual screenshot testing Jul 7, 2018
vendor adding all slick dependencies Dec 6, 2017
.dockerignore dockerignore .pyc files Sep 5, 2018
.gitattributes Add .gitattributes & normalize line endings Apr 5, 2017
.gitignore Empty dev less file and add to gitignore Sep 24, 2018
.gitmodules Moved infogami and wmd to internetarchive. Jul 1, 2011
.python-version Add .python-version (can be used by pyenv) Jul 26, 2016
.stylelintignore Linting should apply to subfolders as well Sep 14, 2018
.stylelintrc.json Revert "Revert "Added "length-zero-no-unit" and fixed offenders. (#1117 Sep 19, 2018
.travis.yml remove unused test db from travis Sep 17, 2018
CONTRIBUTING.md Add some CONTRIBUTING notes about frontend patches Sep 13, 2018
LICENSE update AGPL v3.0 url, latest https Sep 17, 2018
Makefile Document and standardise file naming inside static/css folder Sep 24, 2018
PULL_REQUEST_TEMPLATE.md Pull Request Template Added Mar 10, 2018
Readme.md Update Readme.md Sep 16, 2018
Vagrantfile [hotfix/update-vagrant-to-xenial] ensure ol-start runs when vagrant r… Jun 3, 2018
config Make the support structure a little more robust Jun 21, 2011
infogami Reorganized the repo to move all python code into openlibrary module. Jul 8, 2009
package.json Fix bundlesize values Sep 24, 2018
requirements.txt mving amazon pkg to common for tests Jul 21, 2018
requirements_common.txt mving amazon pkg to common for tests Jul 21, 2018
setup.py Merge pull request #985 from cdrini/refactor/remove-couchdb-remnants Jun 26, 2018
test_requirements.txt update pytest to 3.7.2 Aug 22, 2018

Readme.md

Open Library

Build Status Join the chat at https://gitter.im/theopenlibrary/Lobby

Open Library is an open, editable library catalog, building towards a web page for every book ever published.

Table of Contents

Overview

Open Library is an effort started in 2006 to create "one web page for every book ever published". It provides access to many public domain and out-of-print books, which can be read online.

Installation

First you need to have installed Virtualbox and Vagrant.

Next, fork the OpenLibrary repo to your own Github account and clone your forked repo to your local machine:

git clone git@github.com:YOURACCOUNT/openlibrary.git

Enter the project directory and provision + launch the dev virtual machine instance using vagrant:

cd openlibrary
vagrant up

You can now view your running instance by loading http://localhost:8080 in a web browser.

You can turn off the virtual machine from the host machine using:

vagrant halt

To administrate and ssh into the vagrant dev virtual machine, type:

vagrant ssh

Note:
Remember that, thanks to vagrant and virtual box, your local folder openlibrary (where you ran vagrant up) contains exactly the same files as /openlibrary in the dev virtual machine (the one that you login to via vagrant ssh).

Reload vagrant services:

  • From within vagrant restart the Open Library service via: sudo systemctl restart ol-web.
  • If you are not in the vagrant dev virtual machine you can simply run vagrant reload for the same.

Help!

If running in Vagrant, but services don't seem to have been properly started -- e.g. the site works but you can't login with the default credentials -- try running vagrant up --provision.

Developer's Guide

For instructions on administrating your Open Library instance and build instructions for developers, refer the Developer's Quickstart Guide.

You can also find more information regarding Developer Documentation for Open Library in the Open Library Wiki

Code Organization

  • openlibrary/core - core openlibrary functionality, imported and used by www
  • openlibrary/plugins - other models, controllers, and view helpers
  • openlibrary/views - views for rendering web pages
  • openlibrary/templates - all the templates used in the website
  • openlibrary/macros - macros are like templates, but can be called from wikitext

Architecture

The Backend

OpenLibrary is developed on top of the Infogami wiki system, which is itself built on top of the web.py Python web framework and the Infobase database framework.

Once you've read the overview of OpenLibrary Backend technologies, it's highly encouraged you read the developer primer which explains how to use Infogami (and its database, Infobase):

Running tests

Open Library tests can be run using pytest. Kindly look up on our Testing Document for more details

Inside vagrant, go to the application base directory:

cd /openlibrary
make test

Integration Tests

Integration tests use the Splinter webdriver with Google Chrome. For instructions on installation requirements and running integration tests, see Integration Tests README