Skip to main content

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


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

jupyformat-1.0.0-py3-none-any.whl (10.7 kB view hashes)

Uploaded Python 3

Supported by

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