Skip to main content

Converts multiple Jupyter notebooks to Quarto documents at once

Project description

Quarto Batch Converter

Description

Quarto Batch Converter is a utility that converts ipynb files to qmd files using the Quarto command line. This tool is designed to simplify the process of converting multiple ipynb files at once, making it ideal for large projects or batch conversions.

This cli is equivalent to perform the following statement on multiple times:

quarto convert file.ipynb

Features

  • Converts files to files using quarto convert (ipynb to qmd, qmd to ipynb)
  • Filters file based on extension (default: ipynb)
  • Filters file based on a match pattern that could be replaced for the output file (e.g. _test.ipynb -> test.qmd)
  • Preserves the original directory structure of the input files
  • Allows specifying a prefix for the converted files
  • Supports glob style paths as well as recursion in the subdirectory

Installation

To install Quarto Batch Converter, run the following command:

pipx install quarto_batch_convert

This will install the package and make the quarto_batch_convert and its alias qbc command line available.

Usage

To use Quarto Batch Converter, navigate to the directory containing the ipynb files you want to convert and run the following command:

quarto_batch_convert <input_paths> [options]

Replace <input_paths> with one or more directory paths, file paths, or glob patterns to search for ipynb files.

Options

  • -e, --extension: File extension to filter files when input is a directory (default: .ipynb)
  • -m, --match-replace-pattern: Match pattern and optional replace pattern, separated by a forward slash. If no slash is present, only matching is performed.
  • -p, --prefix: Prefix to add to the new file name
  • -k, --keep-extension: Keep the original extension as part of the filename
  • -o, --output-path: Output path where to generate the .qmd files (default: current directory)
  • -r, --recursive: Search files recursively when input is a directory

Examples

  • Convert all ipynb files in the current directory (no subdirectory):
quarto_batch_convert .
  • Convert all ipynb files in the notebooks directory and its subdirectories:
quarto_batch_convert notebooks -r
  • Convert all ipynb files in the notebooks directory and add a prefix converted_ to the output files:
quarto_batch_convert notebooks -p converted_
  • Convert all ipynb files in the notebooks directory and replace the string old_ with new_ in the file names:
quarto_batch_convert notebooks -m old_/new_

Contributing

Contributions to Quarto Batch Converter are welcome. If you have any issues or feature requests, please submit a pull request or open an issue on the GitHub repository.

License

Quarto Batch Converter 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

quarto_batch_convert-2025.8.8.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

quarto_batch_convert-2025.8.8-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file quarto_batch_convert-2025.8.8.tar.gz.

File metadata

  • Download URL: quarto_batch_convert-2025.8.8.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for quarto_batch_convert-2025.8.8.tar.gz
Algorithm Hash digest
SHA256 4b2d4d44ff159fbcb6c26d29849daecd1db2e669f03368e1599460f00d9f523e
MD5 7c6dfa5cfd18f3d39829d49e6f02aff0
BLAKE2b-256 03053a7e3fd14d02a4852382d9dfd9ddc71988de2c5d28c0b1a3ac7b2b8d7136

See more details on using hashes here.

Provenance

The following attestation bundles were made for quarto_batch_convert-2025.8.8.tar.gz:

Publisher: python-publish.yml on kompre/quarto_batch_convert

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

File details

Details for the file quarto_batch_convert-2025.8.8-py3-none-any.whl.

File metadata

File hashes

Hashes for quarto_batch_convert-2025.8.8-py3-none-any.whl
Algorithm Hash digest
SHA256 161704cc22d8b578980443fc8c725fa87d694dddba5ef1b4835847cc6d81f0b7
MD5 c2ba30e76d7318fbb1558dbd47450cf8
BLAKE2b-256 c9e5d140fbfdf6b16d91f72d28cbbdd059aedd1ae3242f9607884146fb48e2eb

See more details on using hashes here.

Provenance

The following attestation bundles were made for quarto_batch_convert-2025.8.8-py3-none-any.whl:

Publisher: python-publish.yml on kompre/quarto_batch_convert

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