API for adding content to the Kolibri content curation server
Project description
ricecooker
The ricecooker library is a framework for automating the conversion of educational content into
Kolibri content channels and uploading them to Kolibri Studio,
which is the central content server for Kolibri.
📚 Ricecooker docs
Visit the documentation site at 📚 ricecooker.readthedocs.io for the full details about installation, getting started, API reference, and code examples.
Overview of Kolibri content
ricecooker is used to take openly licensed educational content available on the
web and convert it into an offline-friendly package that can be imported into Kolibri.
The basic process of getting new content into Kolibri is as follows:
- UPLOAD your content to Kolibri Studio either manually through the Kolibri Studio
web interface or programmatically using a
ricecooker-based content integration script. - PUBLISH the channel on Kolibri Studio to make it accessible for use in Kolibri.
- IMPORT the the channel into Kolibri using the channel token displayed in Kolibri Studio after the PUBLISH step is done.
The diagram below illustrates how content flows within the Kolibri ecosystem
and highlights the part which is covered by the ricecooker framework (bottom left).
External content sources (left) are first uploaded to Kolibri Studio (middle), so they can be used in the Kolibri Learning Platform (right).
How can I contribute?
Visit Contributing.
Further reading
The Ricecooker docs website is the best place to learn about writing automated content integration scripts.
Here are some links to other documents and guides you can read to learn about the other parts of the Kolibri content platform:
- The Kolibri Content Integration Guide is a comprehensive guide to the decisions, processes, and tools for integrating external content sources for use in the Kolibri Learning Platform.
- Read the Kolibri Studio docs to learn more about the Kolibri Studio features
- Read the Kolibri docs to learn how to install Kolibri on your machine (useful for testing channels)
======= History
0.6.46 (2020-09-21)
- Add
ricecooker.utils.youtube, containing utilities for handling and caching YouTube videos and playlists. - Improve validation of
mandnmastery model values inExerciseNode.
0.6.45 (2020-07-25)
- Remove SushiBar remote monitoring and remote command functionality
0.6.44 (2020-07-16)
- Documentation overhaul and refresh, see
ricecooker.readthedocs.io <https://ricecooker.readthedocs.io/>__ - Add support for specifying a Channel tagline
- Ensure we send
extra_fieldsdata for all node types - Make
--resetbehavior the default - Remove legacy code around
compatibiliry_modeand BaseChef class - Improved caching logic (no caching for thumbnails and local paths, always cache youtube downloads)
- Ensure chefs clean up after run (automatic temp files removal)
- Added
save_channel_tree_as_jsonfull channel metadata as part of every run. - Added support for web content archiving
- Further improvements to logging
- Bugfix: deep deterministic cache keys for nested dicts values in
ffmpeg_settings
0.6.42 (2020-04-10)
- Added
--sample Ncommand line option. Run script with--sample 10to produce a test version of the channel with 10 randomly selected nodes from the full channel. Use this to check transformations are working as expected. - Added
dryruncommand. Use the command./sushichef.py dryrunto run the chef as normal but skip the step where the files get uploaded to Studio. - Added HTTP proxy functionality for YouTubeVideoFile and YouTubeSubtitleFile
Set the
PROXY_LISTenv variable to a;-separated list of{ip}:{port}. Ricecooker will detect the presence of thePROXY_LISTand use it when accessing resources via YoutubeDL. Alternatively, setUSEPROXYenv var to use a list of free proxy servers, which are very slow and not reliable. - Improved colored logging functionality and customizability of logging output.
0.6.40 (2020-02-07)
- Changed default behaviour to upload the staging tree instead of the main tree
- Added
--deployflag to reproduce old bahavior (upload to main tree) - Added thumbnail generating methods for audio, HTML5, PDF, and ePub nodes.
Set the
derive_thumbnail=Truewhen creating the Node instance, or pass the command line argument--thumbnailsto generate thumbnails for all nodes. Note: automatic thumbnail generation will only work ifthumbnailis None.
0.6.38 (2019-12-27)
- Added support the
h5pcontent kind andh5pfile type - Removed monkey-patching of
localStorageanddocument.cookiein the helper methoddownload_static_assets - Added validation logic for tags
- Improved error reporting
0.6.36 (2019-09-25)
- Added support for tags using the
JsonChefworkflow - Added validation step to ensure subtitles file are unique for each language code
- Document new
SlidesShowcontent kind coming in Kolibri 0.13 - Added docs with detailed instruction for content upload and update workflows
- Bugfixes to file extension logic and improved error handling around subtitles
0.6.32 (2019-08-01)
- Updated documentation to use top-level headings
- Removed support for Python 3.4
- Removed support for the "sous chef" workflow
0.6.31 (2019-07-01)
- Handle more subtitle convertible formats:
SRT,TTML,SCC,DFXP, andSAMI
0.6.30 (2019-05-01)
- Updated docs build scripts to make ricecooker docs available on read the docs
- Added
correctionscommand line script for making bulk edits to content metadata - Added
StudioApiclient to support CRUD (created, read, update, delete) Studio actions - Added pdf-splitting helper methods (see
ricecooker/utils/pdf.py)
0.6.23 (2018-11-08)
- Updated
le-utilsandpressurcookerdependencies to latest version - Added support for ePub files (
EPubFiles can be added ofDocumentNodes) - Added tag support
- Changed default value for
STUDIO_URLtoapi.studio.learningequality.org - Added
aggregatorandproviderfields for content nodes - Various bugfixes to image processing in exercises
- Changed validation logic to use
self.filenameto check file format is inself.allowed_formats - Added
is_youtube_subtitle_file_supported_languagehelper function to support importing youtube subs - Added
srt2vttsubtitles conversion - Added static assets downloader helper method in
utils.downloader.download_static_assets - Added LineCook chef functions to
--generateCSV from directory structure - Fixed the always
randomize=Truebug - Docs: general content node metadata guidelines
- Docs: video compression instructions and helper scripts
convertvideo.batandconvertvideo.sh
0.6.17 (2018-04-20)
- Added support for
roleattribute on ConentNodes (currentlycoach||learner) - Update pressurecooker dependency (to catch compression errors)
- Docs improvements, see https://github.com/learningequality/ricecooker/tree/master/docs
0.6.15 (2018-03-06)
- Added support for non-mp4 video files, with auto-conversion using ffmpeg. See
git diff b1d15fa 87f2528 - Added CSV exercises workflow support to
LineCookchef class - Added --nomonitor CLI argument to disable sushibar functionality
- Defined new ENV variables:
- PHANTOMJS_PATH: set this to a phantomjs binary (instead of assuming one in node_modules)
- STUDIO_URL (alias CONTENTWORKSHOP_URL): set to URL of Kolibri Studio server where to upload files
- Various fixes to support sushi chefs
- Removed
minimize_html_css_jsutility function fromricecooker/utils/html.pyto remove dependency oncss_html_js_minifyand support Py3.4 fully.
0.6.9 (2017-11-14)
- Changed default logging level to --verbose
- Added support for cronjobs scripts via
--cmdsock(see docs/daemonization.md) - Added tools for creating HTML5Zip files in utils/html_writer.py
- Added utility for downloading HTML with optional js support in utils/downloader.py
- Added utils/path_builder.py and utils/data_writer.py for creating souschef archives (zip archive that contains files in a folder hierarchy + Channel.csv + Content.csv)
0.6.7 (2017-10-04)
- Sibling content nodes are now required to have unique source_id
- The field
copyright_holderis required for all licenses other than public domain
0.6.7 (2017-10-04)
- Sibling content nodes are now required to have unique source_id
- The field
copyright_holderis required for all licenses other than public domain
0.6.6 (2017-09-29)
- Added
JsonTreeChefclass for creating channels from ricecooker json trees - Added
LineCookchef class to support souschef-based channel workflows
0.6.4 (2017-08-31)
- Added
languageattribute forContentNode(string key in internal repr. defined in le-utils) - Made
languagea required attribute for ChannelNode - Enabled sushibar.learningequality.org progress monitoring by default Set SUSHIBAR_URL env. var to control where progress is reported (e.g. http://localhost:8001)
- Updated le-utils and pressurecooker dependencies to latest
0.6.2 (2017-07-07)
- Clarify ricecooker is Python3 only (for now)
- Use https:// and wss:// for SuhiBar reporting
0.6.0 (2017-06-28)
- Remote progress reporting and logging to SushiBar (MVP version)
- New API based on the SuchiChef classes
- Support existing old-API chefs in compatibility mode
0.5.13 (2017-06-15)
- Last stable release before SushiBar functionality was added
- Renamed --do-not-activate argument to --stage
0.1.0 (2016-09-30)
- First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ricecooker-0.8.0.tar.gz.
File metadata
- Download URL: ricecooker-0.8.0.tar.gz
- Upload date:
- Size: 10.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af3db0e678dd69cd8e77e446e5e878d3bf0bd4ebed1a16b4c923745ac5e32703
|
|
| MD5 |
64044a93e422ae36d8c5757f1a59cdbf
|
|
| BLAKE2b-256 |
5caf91b2a18224db4dfb11cd5860a1b700fa4957f6ade9a4ad5563513be6d15f
|
Provenance
The following attestation bundles were made for ricecooker-0.8.0.tar.gz:
Publisher:
python-publish.yml on learningequality/ricecooker
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ricecooker-0.8.0.tar.gz -
Subject digest:
af3db0e678dd69cd8e77e446e5e878d3bf0bd4ebed1a16b4c923745ac5e32703 - Sigstore transparency entry: 768053796
- Sigstore integration time:
-
Permalink:
learningequality/ricecooker@99daf9a28dcd3684253ae557e36647b1db09d9f1 -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/learningequality
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@99daf9a28dcd3684253ae557e36647b1db09d9f1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ricecooker-0.8.0-py2.py3-none-any.whl.
File metadata
- Download URL: ricecooker-0.8.0-py2.py3-none-any.whl
- Upload date:
- Size: 152.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09a55ff09ff1d09fb92afdb71f0a547e08ab005329e52185705b6c45e4931124
|
|
| MD5 |
a020ab988ff7bc0027a65555a3347d2a
|
|
| BLAKE2b-256 |
ca487c6c3f94210eca06eb2ea4e454ff30cf963e7f5da1983d714fff26c2f621
|
Provenance
The following attestation bundles were made for ricecooker-0.8.0-py2.py3-none-any.whl:
Publisher:
python-publish.yml on learningequality/ricecooker
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ricecooker-0.8.0-py2.py3-none-any.whl -
Subject digest:
09a55ff09ff1d09fb92afdb71f0a547e08ab005329e52185705b6c45e4931124 - Sigstore transparency entry: 768053801
- Sigstore integration time:
-
Permalink:
learningequality/ricecooker@99daf9a28dcd3684253ae557e36647b1db09d9f1 -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/learningequality
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@99daf9a28dcd3684253ae557e36647b1db09d9f1 -
Trigger Event:
release
-
Statement type: