Sushi chef for Better World Ed
- Import content from Better World Ed
into Kolibri Studio
-
Install Python 3 if you don't have it already.
-
Install pip if you don't have it already.
-
Create a Python virtual environment for this project (optional, but recommended):
- Install the virtualenv package:
pip install virtualenv
- The next steps depends if you're using UNIX (Mac/Linux) or Windows:
- For UNIX systems:
- Create a virtual env called
venv
in the current directory using the following command:virtualenv -p python3 venv
- Activate the virtualenv called
venv
by running:source venv/bin/activate
. Your command prompt will change to indicate you're working insidevenv
.
- Create a virtual env called
- For Windows systems:
- Create a virtual env called
venv
in the current directory using the following command:virtualenv -p C:/Python36/python.exe venv
. You may need to adjust the-p
argument depending on where your version of Python is located. - Activate the virtualenv called
venv
by running:.\venv\Scripts\activate
- Create a virtual env called
- For UNIX systems:
- Install the virtualenv package:
-
Run
pip install -r requirements.txt
to install the required python libraries.
In order to run the script, you need an authorization token. To get one,
- Create an account on Kolibri Studio
- Navigate to the Tokens tab under your Settings page
- Copy the given authorization token (you will need this for later).
This sushi chef requires following components:
credentials/client_secret.json
: Google API client information for OAuthcredentials/vimeo_api_client.json
: Vimeo API client info
These files must be obtained separately from the git repo. Ask in the #suchi-chefs channel on slack.
First run the extract script
./extract.py
This will produce the CSV file chefdata/Better_World_Ed_Content_shared_for_Kolibri.csv
In sushi-chef-better-world-ed
directory, run the following command to run the script with token from previous step:
./sushichef.py -v --reset --thumbnails --token=STUDIOTOKENGOESHERE --stage
If you get the error ImportError: pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other)
when running on Mac, you can workaround using
brew install curl-openssl
set -x PYCURL_CURL_CONFIG "/usr/local/opt/curl-openssl/bin/curl-config"
set -x LDFLAGS '-L/usr/local/opt/openssl/lib -L/usr/local/opt/c-ares/lib -L/usr/local/opt/nghttp2/lib -L/usr/local/opt/libmetalink/lib -L/usr/local/opt/rtmpdump/lib -L/usr/local/opt/libssh2/lib -L/usr/local/opt/openldap/lib -L/usr/local/opt/brotli/lib'
set -x CPPFLAGS "-I/usr/local/opt/openssl/include"
pip install pycurl --compile --no-cache-dir