A Sphinx extension for inserting Grasple exercises.
Project description
Sphinx extension: Grapsle
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_1_3_4
: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:
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
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
File details
Details for the file teachbooks_sphinx_grasple-1.0.2.tar.gz
.
File metadata
- Download URL: teachbooks_sphinx_grasple-1.0.2.tar.gz
- Upload date:
- Size: 65.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22a29b68f6287eeec71ece4846a63cf1fa7b0c57dc62e859b24f23fc9dabedad |
|
MD5 | 969ca3fe16467ab87b66117576c75f85 |
|
BLAKE2b-256 | c784e3745e2614861acf8e0f24c7a32ee6c2f7eecec1b97229fbb6a43b0b175c |
Provenance
The following attestation bundles were made for teachbooks_sphinx_grasple-1.0.2.tar.gz
:
Publisher:
python-publish.yml
on TeachBooks/Sphinx-Grasple-public
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
teachbooks_sphinx_grasple-1.0.2.tar.gz
- Subject digest:
22a29b68f6287eeec71ece4846a63cf1fa7b0c57dc62e859b24f23fc9dabedad
- Sigstore transparency entry: 149728338
- Sigstore integration time:
- Predicate type:
File details
Details for the file teachbooks_sphinx_grasple-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: teachbooks_sphinx_grasple-1.0.2-py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07729911c91d5f6363df8cb89a1768ec6584bb9ba6fce9d29aa72c6d846d9c1a |
|
MD5 | 4ae6c440da33ea087ba9e34824a2a1f8 |
|
BLAKE2b-256 | 43003e998481e46f147ddee49bf81a63185c87248ac5d33bf8ba54f1e87c5e75 |
Provenance
The following attestation bundles were made for teachbooks_sphinx_grasple-1.0.2-py3-none-any.whl
:
Publisher:
python-publish.yml
on TeachBooks/Sphinx-Grasple-public
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
teachbooks_sphinx_grasple-1.0.2-py3-none-any.whl
- Subject digest:
07729911c91d5f6363df8cb89a1768ec6584bb9ba6fce9d29aa72c6d846d9c1a
- Sigstore transparency entry: 149728340
- Sigstore integration time:
- Predicate type: