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(ipynbtoqmd,qmdtoipynb) - 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.qmdfiles (default: current directory)-r,--recursive: Search files recursively when input is a directory
Examples
- Convert all
ipynbfiles in the current directory (no subdirectory):
quarto_batch_convert .
- Convert all
ipynbfiles in thenotebooksdirectory and its subdirectories:
quarto_batch_convert notebooks -r
- Convert all
ipynbfiles in thenotebooksdirectory and add a prefixconverted_to the output files:
quarto_batch_convert notebooks -p converted_
- Convert all
ipynbfiles in thenotebooksdirectory and replace the stringold_withnew_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
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
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 quarto_batch_convert-2025.8.9.tar.gz.
File metadata
- Download URL: quarto_batch_convert-2025.8.9.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de45e6d68311b6ac042d7a5bca18d4b58c317aeaa5fa2a2877f7d8fc9fdf6597
|
|
| MD5 |
b5ca680f199dfd2a8e909707e196e189
|
|
| BLAKE2b-256 |
2b2d894a68820290e432d966eedf08f5b4dd32c65369e4d76cde33671bfb8f33
|
Provenance
The following attestation bundles were made for quarto_batch_convert-2025.8.9.tar.gz:
Publisher:
python-publish.yml on kompre/quarto_batch_convert
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quarto_batch_convert-2025.8.9.tar.gz -
Subject digest:
de45e6d68311b6ac042d7a5bca18d4b58c317aeaa5fa2a2877f7d8fc9fdf6597 - Sigstore transparency entry: 409526117
- Sigstore integration time:
-
Permalink:
kompre/quarto_batch_convert@395504842caa29e9b82fa30a8c631cb67bc07a61 -
Branch / Tag:
refs/tags/2025.8.9 - Owner: https://github.com/kompre
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@395504842caa29e9b82fa30a8c631cb67bc07a61 -
Trigger Event:
push
-
Statement type:
File details
Details for the file quarto_batch_convert-2025.8.9-py3-none-any.whl.
File metadata
- Download URL: quarto_batch_convert-2025.8.9-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3af4bf9131ff055a3b62761ff28161cb2140185a2caf1e68fc81b9d5edf93a6
|
|
| MD5 |
7691602e451f7dcd8ff9a6b9d2913df0
|
|
| BLAKE2b-256 |
ec7bc2714e419fcd3abc62855fe7d659beb54929bcbe6be83a10f66a66bb4944
|
Provenance
The following attestation bundles were made for quarto_batch_convert-2025.8.9-py3-none-any.whl:
Publisher:
python-publish.yml on kompre/quarto_batch_convert
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quarto_batch_convert-2025.8.9-py3-none-any.whl -
Subject digest:
b3af4bf9131ff055a3b62761ff28161cb2140185a2caf1e68fc81b9d5edf93a6 - Sigstore transparency entry: 409526118
- Sigstore integration time:
-
Permalink:
kompre/quarto_batch_convert@395504842caa29e9b82fa30a8c631cb67bc07a61 -
Branch / Tag:
refs/tags/2025.8.9 - Owner: https://github.com/kompre
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@395504842caa29e9b82fa30a8c631cb67bc07a61 -
Trigger Event:
push
-
Statement type: