Skip to main content

A Sphinx extension for inserting Grasple exercises.

Project description

Sphinx extension: Grasple

This package contains a Sphinx extension for inserting Grasple exercises into a Jupyter book as an iframe. It allows you to easily add Grasple question with some formatting and, more importantly, the creation of QR codes in the PDF version of the page. This leads to the source link of the iframe.

This package is a continuation of the package https://github.com/dbalague/sphinx-grasple/.

Grasple gives you an embed code for each exercise, which can be added directly to your markdown-file. This package improved the embedding. More information on Grasple and the support of TU Delft can be found on: Teaching Support - Educational Tools - Grasple

Installation

To install the teachbooks-sphinx-grasple extension, follow these steps:

Step 1: Install the Package

Install the teachbooks-sphinx-grasple package using pip:

pip install teachbooks-sphinx-grasple

Step 2: Add to requirements.txt

Make sure that the package is included in your project's requirements.txt to track the dependency:

teachbooks-sphinx-grasple

Step 3: Enable in _config.yml

In your _config.yml file, add the extension to the list of Sphinx extra extensions (important: underscore, not dash this time):

sphinx: 
    extra_extensions:
        - teachbooks_sphinx_grasple

Usage

To use, include the following in your Jupyter book

::::{grasple}
:iframeclass: dark-light
:url: https://embed.grasple.com/exercises/f6c1bb4b-e63e-492e-910a-5a8c433de281?id=75093
:label: grasple_exercise_manual
:dropdown:
:description: Cross product in $\R^4$?

::::

In the jupyter book this leads to a custom admonition with the exercise included (https://embed.grasple.com/exercises/f6c1bb4b-e63e-492e-910a-5a8c433de281?id=75093).

In the PDF this leads to: example pdf

Important Note

The tests provided are still the original ones from sphinx-exercise and have not (yet) been adapted.

Contribute

This tool's repository is stored on GitHub. The README.md of the branch manual_docs is also part of the TeachBooks manual as a submodule. If you'd like to contribute, you can create a fork and open a pull request on the GitHub repository. To update the README.md shown in the TeachBooks manual, create a fork and open a merge request for the GitHub repository of the manual. If you intent to clone the manual including its submodules, clone using: git clone --recurse-submodulesgit@github.com:TeachBooks/manual.git.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

teachbooks_sphinx_grasple-1.2.1.tar.gz (73.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

teachbooks_sphinx_grasple-1.2.1-py3-none-any.whl (53.7 kB view details)

Uploaded Python 3

File details

Details for the file teachbooks_sphinx_grasple-1.2.1.tar.gz.

File metadata

File hashes

Hashes for teachbooks_sphinx_grasple-1.2.1.tar.gz
Algorithm Hash digest
SHA256 92ba7093612f22fa90a2118201e61896a8052a71fdcccb0ab21689ed0d7eaf3b
MD5 4cf34520f9038a2b6655b5d6207388b5
BLAKE2b-256 15056a47987d0f52fbf69aefe2d96e406bc24633153dc98eb25a529d823f721c

See more details on using hashes here.

Provenance

The following attestation bundles were made for teachbooks_sphinx_grasple-1.2.1.tar.gz:

Publisher: python-publish.yml on TeachBooks/Sphinx-Grasple-public

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file teachbooks_sphinx_grasple-1.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for teachbooks_sphinx_grasple-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ea78673f62f9eff36180ff274ec1fe9f1ea49baf0b40f6e3cb76eedce7f81366
MD5 809a8f2d0792fb48ba4543b16dcb7d7a
BLAKE2b-256 a8379a06fba6ffc37676cd289f98b080ca396e1c4d9dd7f8a358b8f802c925ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for teachbooks_sphinx_grasple-1.2.1-py3-none-any.whl:

Publisher: python-publish.yml on TeachBooks/Sphinx-Grasple-public

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page