Custom functions for transforming files for jupyter book
Project description
jupyformat
jupyformat
is a custom parser for Jupyter Book designed to execute Python code within your Markdown files, generating dynamic content during the parsing process.
Table of Contents
Installation
To install jupyformat
, use pip
:
pip install jupyformat
Dependencies
List any external dependencies required by jupyformat
.
Usage
Integrate jupyformat
into your Jupyter Book configuration to enhance content parsing. Update your _config.yml
or equivalent configuration file:
# _config.yml
# ...
markdown:
parser: jupyformat.reads
extension: .md
sphinx:
config:
nb_custom_formats:
.bpy:
- jupyformat.reads
- format: .md
Now, your Jupyter Book will use jupyformat
to read .bpy
files or whatever extension as long is python code.
Features
- Dynamic Content: Execute Python code within Markdown files to generate dynamic content.
- Custom Metadata: Utilize custom metadata in your
.md
files to control rendering options. - Flexible Output Formats: Support for rendering content in various output formats.
Examples
Executing Python Code
# your_file.bpy
name = Juan Prieto
output = f"# This is a dynamic Markdown content generated by: {name}"
Using Custom Metadata
Contributing
We welcome contributions to enhance and improve jupyformat
. Feel free to submit bug reports, feature requests, or pull requests. Refer to the CONTRIBUTING guide for details.
Code Style
Specify the coding style and any linters or formatting tools used in the project.
Testing
You can test with pytest
License
This project is licensed under the MIT License - see the LICENSE file for details.
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 Distributions
Built Distribution
File details
Details for the file jupyformat-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: jupyformat-1.0.0-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e31ad485bda3e8ba88ec397c109574adff81381d6399457250a594421f71668d |
|
MD5 | 01efc229a6355bb88327b070a55e4fe9 |
|
BLAKE2b-256 | 0803707962cdbbaeba7e609570b6eac8c0c739373377e503d5ebe1a353d84a37 |