An open API service indexing awesome lists of open source software.

https://github.com/danielnaab/knetwork-exercises

Imports Khan Academy exercises for The K Network
https://github.com/danielnaab/knetwork-exercises

Last synced: about 1 year ago
JSON representation

Imports Khan Academy exercises for The K Network

Awesome Lists containing this project

README

          

knetwork-exercises
==================
Imports exercises from the Khan Academy topic tree into a Django-ORM managed
database table stored with django-mptt. To use, add `exercises` to
INSTALLED_APPS or use the included project configuration for testing purposes.

The app provides a view which renders the exercise tree as a menu, where each
exercise has a PNG preview.

Dependencies
------------
This project has been built and tested on Python 2.7.1 and Django 1.3.1.
It requires pyobjc (OS X) for screenshot generation via a library version of
the webkit2png tool (https://github.com/danielnaab/webkit2png). To trim the
images, the Python Imaging Library is required.

$ pip install -r requirements.txt

Importing HOWTO
---------------
The test project configuration has dependencies on sqlite3.

$ ./manage.py syncdb

The import can be executed by using the `import_exercises` management command:

$ ./manage.py import_exercises

Screenshot Generation
--------------------
Screenshots for each Khan exercise page may be generated with the
`generate_screenshots` management command. OS X and pyobjc are required.

$ ./manage.py generate_screenshots

Cropping
--------
Cropped versions of each Khan exercise page may also be generated with the
`crop_screenshots` management command. The `generate_screenshots` command must
be executed first.

$ ./manage.py crop_screenshots

Exercises Update
----------------
To grab the upstream copies of the Khan exercises from the Github repository:

$ ./manage.py clone_khan_exercises

Test Server
-----------
To run the Django dev server:

$ ./manage.py runserver

The sample menu navigation should now be accessible at http://localhost:8000