Skip to content

danielnaab/knetwork-exercises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Imports Khan Academy exercises for The K Network

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •