GithubHelp home page GithubHelp logo

coatless-quarto / codecelloptions Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 359 KB

A Quarto developer extension for extracting code cell options from custom code cells

Lua 100.00%
lua options quarto quarto-extension codecell

codecelloptions's Introduction

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

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.

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:

quarto add coatless-quarto/codecelloptions --embed <your-extension-name>

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:

.
└── _extensions
    └── <your-extension-name>
        └── _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 
        - <your-extension>.lua

Options

The extension allows for extracting options from the hashpipe-styled commands, e.g.

```{custom-python}
#| option1: value1
#| option2: value2

# code here
```

You cannot extract options given in inline within the code cell engine declaration; nor should you.

codecelloptions's People

Contributors

coatless avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.