learningequality / sushi-chef-african-storybook

0 stars 0 forks source link

African Storybook Sushi Chef

This integration script creates a Kolibri channel from all the books from the https://www.africanstorybook.org/ website.

Step 0: Installation

Step 1: Obtaining an Authorization Token

You will need an authorization token to create a channel on Kolibri Studio. In order to obtain one:

  1. Create an account on Kolibri Studio.
  2. Navigate to the Tokens tab under your Settings page.
  3. Copy the given authorization token (you will need this for later).

Step 2: Running the chef

  1. Download phantomjs

    wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 tar -xjf phantomjs-2.1.1-linux-x86_64.tar.bz2 rm phantomjs-2.1.1-linux-x86_64.tar.bz2

  2. Set ENV var

    export PHANTOMJS_PATH="???phantomjs-prebuilt/bin/phantomjs"

  3. Run chef

    ./chef.py -v --reset --thumbnails --token= --stage

Dev notes

During development, you can run the chef against the develop server by setting the environment variable as follows:

export STUDIO_URL="https://develop.studio.learningequality.org"

Note: if you don't have an account Studio Develop, you'll need to register and get an API token, since it is a completely separate system from the main Studio server.

Use the command line argument --sample=10 to do a special chef run that only scrapes 10 links from the website. This is a good strategy to iterate on fixes around HTML5 assets and iframe sandboxing issues.