Petlja's sphinx extensions for e-learning content.
Project description
PLCT-Sphinx-Components
PLCT-Sphinx-Components is a project designed to enhance your e-learning content. These extensions are Sphinx-based and focuses on online learning content, making it an ideal choice for creating interactive and engaging online courses.
About the Directives
All the directives provided by PLCT-Sphinx-Components are wrappers for JavaScript-based components. These components facilitate a range of interactive features, such as asking multiple choice or fill in the blank questions, python based programming in the browser, executing SQL queries, and more. This enables the creation of engaging and interactive content within your Sphinx documentation.
PLCT-Sphinx-Components heavily relies on the Pyodide project for running Python-based code in the browser. Pyodide brings the Python runtime to the browser via WebAssembly. This allows for the execution of Python code, data analysis, visualization, and more, all directly within the browser.
Directives
mchoice Directive
The mchoice directive enables you to embed multiple-choice questions within your documentation.
.. mchoice::
:answer1: Belgrade
:answer2: Paris
:answer3: Madrid
:correct: 2
What is the capital of France?
In this example, a multiple-choice question is created with three answer options, and the correct answer is set to "Paris".
fitb Directive
The fitb directive allows you to insert fill-in-the-blank questions in your documentation.
.. fitb::
:answer: OpenAI
The GPT-3 model is developed by |blank|.
In this example, a fill-in-the-blank question is created where the answer is "OpenAI".
Note Directives
The following directives are used to add different types of notes in your documentation:
infonote Directive
The infonote directive is employed to insert an informational note, offering a way to provide supplementary context or explanations about a specific topic.
.. infonote::
This is an informational note.
suggestionnote Directive
The suggestionnote directive is utilized to include a suggestion note, allowing you to provide recommendations or advice related to the content.
.. suggestionnote::
This is a suggestion note with helpful recommendations.
learnmorenote Directive
The learnmorenote directive serves the purpose of adding a note encouraging users to explore additional information or resources for further learning.
.. learnmorenote::
Delve deeper into this topic by exploring additional resources.
technicalnote Directive
The technicalnote directive is used to incorporate a technical note, which can include details or information of a technical nature.
.. technicalnote::
This is a technical note providing in-depth technical information.
questionnote Directive
The questionnote directive enables the addition of a note specifically tailored for posing questions or prompting further consideration.
.. questionnote::
Here's a question to ponder: What are the implications of this concept?
Feel free to customize the content within the directives to suit the specific information you want to convey.
PyCode Directive
The PyCode directive is an extension designed to execute Python code directly within web browsers. We leverage web workers and service workers to provide a seamless input/output experience. This means that students can start experimenting with Python directly in their browsers, without the need to install anything. This makes the first steps much easier.
Usage
.. py-code:: unique_identifier
:packages: rich,numpy
print('Hello, PyCode!')
Optional arguments include:
packages: Specify additional Python packages and the environment will install it usingmicropip, a lightweight version ofpip. This means you can use a wide range of Python packages further enhancing the learning and experimentation possibilities.
Installation and Usage
To use the PLCT-Sphinx-Components in your Sphinx project, follow these steps:
-
Install the extension using pip:
pip install PLCT-Sphinx-Components -
Add the extension to your Sphinx project's
conf.pyfile:extensions = [ # ... other extensions ... 'plct-sphinx-components.extensions.multiple_choice', 'plct-sphinx-components.extensions.fill_in_the_blank', 'plct-sphinx-components.extensions.py_code, ]
-
Once the extension is enabled, you can start using the directives in your documentation files as demonstrated in the examples above.
About
This project is maintained by Petlja and aims to enhance the educational content creation experience using Sphinx. For more information about Petlja and its initiatives, please visit Petlja's website.
License
This project is licensed under the MIT License.
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
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 plct_sphinx_components-0.0.5.tar.gz.
File metadata
- Download URL: plct_sphinx_components-0.0.5.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f8b8415aba74eaac66872721b4c4f9a990bb8f6938f1f6c19905691c4b2e63c
|
|
| MD5 |
88b87976c3f2be9d512ea97d3024f5bc
|
|
| BLAKE2b-256 |
e93685dbdf80eab4070b4d8dd45eb5a2bc584917eb24412cff206d2405dfccf2
|
File details
Details for the file plct_sphinx_components-0.0.5-py2.py3-none-any.whl.
File metadata
- Download URL: plct_sphinx_components-0.0.5-py2.py3-none-any.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f6a13a4b6ad620f4e2714273a24a6ab4df8e17c8fec47e22a55b803788a0a1b
|
|
| MD5 |
0e40df1593d7058992e91fdb7b6f431f
|
|
| BLAKE2b-256 |
94e96e0adbadf133a8ec0496da67dbf4a4f9cf851117c0e13362a7e4b6b5166e
|