Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/coatless-quarto/codecelloptions
A Quarto developer extension for extracting code cell options from custom code cells
https://github.com/coatless-quarto/codecelloptions
codecell lua options quarto quarto-extension
Last synced: 6 days ago
JSON representation
A Quarto developer extension for extracting code cell options from custom code cells
- Host: GitHub
- URL: https://github.com/coatless-quarto/codecelloptions
- Owner: coatless-quarto
- Created: 2023-11-19T09:26:18.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-28T23:34:04.000Z (8 months ago)
- Last Synced: 2024-07-30T20:10:16.464Z (5 months ago)
- Topics: codecell, lua, options, quarto, quarto-extension
- Language: Lua
- Homepage:
- Size: 351 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# codecelloptions: A Quarto Experiment on Options
The `codecelloptions` extension is a Quarto extension designed to improve working with custom code cells and cell options in Quarto.
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/coatless-quarto/codecelloptions)
## Usage
The `codecelloptions` extension does not introduce significant enhancements to your document's content. Instead, it serves as a way for authors to quickly bootstrap their own custom code cell through an [extension embedding](https://quarto.org/docs/journals/formats.html#extension-embedding).
## Installation
To install the `codecelloptions` extension inside of your own extension, follow these steps:
1. Open your terminal.
2. Navigate to where your own extension's development location is.
3. Execute the following command:
```sh
quarto add coatless-quarto/codecelloptions --embed
```This command will download and install the extension under the `_extensions` subdirectory of your Quarto extension project. If you are using version control, ensure that you include this directory in your repository.
### File structure
When embedding the extension inside of your own extension, you should see the following folder structure:
```sh
.
└── _extensions
└──
└── _extensions
└── coatless-quarto
└── cellcodeoptions```
### Registering the extension
Inside of the `_extension.yml`, please include the nested extension under `filters` as the first extension to run:
```
title: My Extension
author: My Name
version: 0.1.1
quarto-required: ">=1.4.549"
contributes:
format:
common:
filters:
- coatless-quarto/cellcodeoptions
- .lua
```## Options
The extension allows for extracting options from the hashpipe-styled commands, e.g.
````md
```{custom-python}
#| option1: value1
#| option2: value2# code here
```
````You cannot extract options given in `inline` within the code cell engine declaration; nor should you.