# Quarto Batch Converter
## Description
Quarto Batch Converter is a utility that converts `ipynb` files to `qmd` files using the [Quarto command line](https://quarto.org/). 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:
```sh
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:
```bash
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:
```bash
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):
```bash
quarto_batch_convert .
```
* Convert all `ipynb` files in the `notebooks` directory and its subdirectories:
```bash
quarto_batch_convert notebooks -r
```
* Convert all `ipynb` files in the `notebooks` directory and add a prefix `converted_` to the output files:
```bash
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:
```bash
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](https://opensource.org/licenses/MIT).
Raw data
{
"_id": null,
"home_page": null,
"name": "quarto-batch-convert",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.13",
"maintainer_email": null,
"keywords": "quarto, jupyter, notebook, converter, cli",
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/89/7c/254383055b217fcd9f6b91a8bce7a8e8fe4eeea7368617789f73ed552fa5/quarto_batch_convert-2025.8.7.tar.gz",
"platform": null,
"description": "# Quarto Batch Converter\n\n## Description\n\nQuarto Batch Converter is a utility that converts `ipynb` files to `qmd` files using the [Quarto command line](https://quarto.org/). This tool is designed to simplify the process of converting multiple `ipynb` files at once, making it ideal for large projects or batch conversions.\n\nThis cli is equivalent to perform the following statement on multiple times:\n\n```sh\nquarto convert file.ipynb\n```\n\n## Features\n\n* Converts files to files using `quarto convert` (`ipynb` to `qmd`, `qmd` to `ipynb`) \n* Filters file based on extension (default: `ipynb`)\n* Filters file based on a match pattern that could be replaced for the output file (e.g. `_test.ipynb` -> `test.qmd`)\n* Preserves the original directory structure of the input files\n* Allows specifying a prefix for the converted files\n* Supports glob style paths as well as recursion in the subdirectory\n\n## Installation\n\nTo install Quarto Batch Converter, run the following command:\n```bash\npipx install quarto_batch_convert\n```\nThis will install the package and make the `quarto_batch_convert` and its alias `qbc` command line available.\n\n## Usage\n\nTo use Quarto Batch Converter, navigate to the directory containing the `ipynb` files you want to convert and run the following command:\n```bash\nquarto_batch_convert <input_paths> [options]\n```\nReplace `<input_paths>` with one or more directory paths, file paths, or glob patterns to search for `ipynb` files.\n\n### Options\n\n* `-e`, `--extension`: File extension to filter files when input is a directory (default: `.ipynb`)\n* `-m`, `--match-replace-pattern`: Match pattern and optional replace pattern, separated by a forward slash. If no slash is present, only matching is performed.\n* `-p`, `--prefix`: Prefix to add to the new file name\n* `-k`, `--keep-extension`: Keep the original extension as part of the filename\n* `-o`, `--output-path`: Output path where to generate the `.qmd` files (default: current directory)\n* `-r`, `--recursive`: Search files recursively when input is a directory\n\n### Examples\n\n* Convert all `ipynb` files in the current directory (no subdirectory):\n```bash\nquarto_batch_convert .\n```\n* Convert all `ipynb` files in the `notebooks` directory and its subdirectories:\n```bash\nquarto_batch_convert notebooks -r\n```\n* Convert all `ipynb` files in the `notebooks` directory and add a prefix `converted_` to the output files:\n```bash\nquarto_batch_convert notebooks -p converted_\n```\n* Convert all `ipynb` files in the `notebooks` directory and replace the string `old_` with `new_` in the file names:\n```bash\nquarto_batch_convert notebooks -m old_/new_\n```\n## Contributing\n\nContributions 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.\n\n## License\n\nQuarto Batch Converter is licensed under the [MIT License](https://opensource.org/licenses/MIT).",
"bugtrack_url": null,
"license": null,
"summary": "Converts multiple Jupyter notebooks to Quarto documents at once",
"version": "2025.8.7",
"project_urls": {
"Homepage": "https://github.com/kompre/quarto_batch_convert"
},
"split_keywords": [
"quarto",
" jupyter",
" notebook",
" converter",
" cli"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "2793bfaab5221ab5330457374a69d293949cc69f5376151fe60d07c656336b23",
"md5": "afb5cf604691bc7a7f65494f3e1a383a",
"sha256": "e55aa884d4331a1ba825b93132566ef04a6a5f80ec3134591a39c0aa70239dda"
},
"downloads": -1,
"filename": "quarto_batch_convert-2025.8.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "afb5cf604691bc7a7f65494f3e1a383a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.13",
"size": 7222,
"upload_time": "2025-08-14T10:30:47",
"upload_time_iso_8601": "2025-08-14T10:30:47.467559Z",
"url": "https://files.pythonhosted.org/packages/27/93/bfaab5221ab5330457374a69d293949cc69f5376151fe60d07c656336b23/quarto_batch_convert-2025.8.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "897c254383055b217fcd9f6b91a8bce7a8e8fe4eeea7368617789f73ed552fa5",
"md5": "e994c3874fc2352d88e2e8001fe1c04f",
"sha256": "cf65cf4e173e0f6adb8b6be38f1ea754550f2e004cf9a8b7c0241d7615e1b361"
},
"downloads": -1,
"filename": "quarto_batch_convert-2025.8.7.tar.gz",
"has_sig": false,
"md5_digest": "e994c3874fc2352d88e2e8001fe1c04f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.13",
"size": 5196,
"upload_time": "2025-08-14T10:30:48",
"upload_time_iso_8601": "2025-08-14T10:30:48.624742Z",
"url": "https://files.pythonhosted.org/packages/89/7c/254383055b217fcd9f6b91a8bce7a8e8fe4eeea7368617789f73ed552fa5/quarto_batch_convert-2025.8.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-14 10:30:48",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "kompre",
"github_project": "quarto_batch_convert",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "quarto-batch-convert"
}