Skip to content

Commit

Permalink
Merge branch 'main' of github.com:quarto-dev/quarto-cli into main
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonstyle committed Feb 4, 2021
2 parents 3bafd51 + bc90bb0 commit 3ef6b69
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 23 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: Create Release
on:
schedule:
- cron: "0 4 * * *"
workflow_dispatch:
inputs:
publish-release:
Expand Down Expand Up @@ -29,7 +27,9 @@ jobs:

steps:
- uses: actions/checkout@v2

with:
fetch-depth: 0

- name: config
id: config
run: |
Expand Down
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
# Quarto CLI
# Quarto

Quarto is an academic, scientific, and technical publishing system built on [Pandoc](https://pandoc.org).

In addition to the core capabilities of Pandoc, Quarto includes:

1. Support for integrated output from R and Python via integration with knitr and Jupyter
2. A project system for rendering groups of documents at once and sharing metadata between them.
3. Cross references for figures, tables, equations, sections, listings, proofs, and more.
4. Sophisticated layout for panels of figures, tables, and other content.
1. Support for embedding output from R and Python via integration with knitr and Jupyter.
2. A project system for rendering groups of documents at once.
3. Flexible ways to specify rendering options, including project-wide options and per-format options.
4. Cross references for figures, tables, equations, sections, listings, proofs, and more.
5. Sophisticated layout for panels of figures, tables, and other content.
6. Automatic installation of required LaTeX packages when rendering PDF output.

Quarto is currently in alpha development, so not generally recommended for everyday use! Documentation on using Quarto will be available soon.

## Installation

You can install an alpha-build of the Quarto command-line tools from here:
You can install an alpha-build of the Quarto CLI (command-line interface) from here:

<https://github.com/quarto-dev/quarto-cli/releases/tag/v0.1.32>
<https://github.com/quarto-dev/quarto-cli/releases/tag/v0.1.35>

You can verify that Quarto has been installed correctly with:

Expand All @@ -28,7 +30,7 @@ To install the development version of the Quarto CLI, git clone this repo then r
``` bash
$ git clone https://github.com/quarto-dev/quarto-cli
$ cd quarto-cli
$ ./configure-macos.sh
$ ./configure-macos.sh
```

## Usage
Expand All @@ -39,7 +41,7 @@ You can use the `quarto render` command to render plain markdown, R Markdown, or
$ quarto render plain.md
$ quarto render rmarkdown.Rmd
$ quarto render jupyter.ipynb
$ quarto render jupyter.md
$ quarto render jupyter.md
```

Note that the last variation renders a [Jupyter Markdown](https://jupytext.readthedocs.io/en/latest/formats.html#jupytext-markdown) document, which is pure markdown representation of a Jupyter notebook. A markdown file is denoted as Jupyter markdown via the inclusion of a `jupyter` entry in YAML front matter indicating the Jupyter kernel or Jupytext configuration for the document (e.g. `jupyter: python3`).
Expand Down Expand Up @@ -69,4 +71,6 @@ format:
---
```

All pandoc formats (see `pandoc --list-output-formats`) are supported. The YAML metadata provided for each format may include any pandoc [metadata variables](https://pandoc.org/MANUAL.html#variables) or [command-line defaults](https://pandoc.org/MANUAL.html#default-files). All YAML metadata can be provided globally for all formats (as illustrated with `toc` and `toc-depth` above) or on a per-format basis.
All pandoc formats (see `pandoc --list-output-formats`) are supported.

The YAML metadata provided for each format may include any pandoc [metadata variables](https://pandoc.org/MANUAL.html#variables) or [command-line defaults](https://pandoc.org/MANUAL.html#default-files). All YAML metadata can be provided globally for all formats (as illustrated with `toc` and `toc-depth` above) or on a per-format basis.
1 change: 1 addition & 0 deletions src/command/create-project/cmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { projectCreate } from "../../project/project-create.ts";

export const createProjectCommand = new Command()
.name("create-project")
.description("Create a project for rendering multiple documents")
.arguments("[dir:string]")
.option(
"-T, --type <type:string>",
Expand Down
6 changes: 3 additions & 3 deletions src/command/render/cmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { render } from "./render.ts";
export const renderCommand = new Command()
.name("render")
.stopEarly()
.arguments("<input-files:string> [...args]")
.arguments("<input:string> [...args]")
.description(
"Render input file(s) to various document types.",
)
Expand Down Expand Up @@ -90,11 +90,11 @@ export const renderCommand = new Command()
"quarto render notebook.Rmd --output -",
)
// deno-lint-ignore no-explicit-any
.action(async (options: any, inputFiles: string, args: string[]) => {
.action(async (options: any, input: string, args: string[]) => {
args = args || [];

// pull inputs out of the beginning of flags
const inputs = [inputFiles];
const inputs = [input];
const firstPandocArg = args.findIndex((arg) => arg.startsWith("-"));
if (firstPandocArg !== -1) {
inputs.push(...args.slice(0, firstPandocArg));
Expand Down
13 changes: 6 additions & 7 deletions src/execute/jupyter/jupyter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,10 @@ export const jupyterEngine: ExecutionEngine = {

// if it's a transient notebook then remove it, otherwise
// sync so that jupyter[lab] can open the .ipynb w/o errors
if (options.target.data && !options.format.render[kKeepIpynb]) {
Deno.removeSync(options.target.input);
if (options.target.data) {
if (!options.format.render[kKeepIpynb]) {
Deno.removeSync(options.target.input);
}
} else {
await jupytextSync(options.target.input, [], true);
}
Expand Down Expand Up @@ -300,11 +302,8 @@ export const jupyterEngine: ExecutionEngine = {
},
};

export function pythonBinary(binary = "python") {
const condaPrefix = getenv("CONDA_PREFIX");
return condaPrefix +
(Deno.build.os !== "windows" ? "/bin/" : "\\") +
binary;
export function pythonBinary(binary = "python3") {
return binary;
}

async function jupyterKernelspecFromFile(
Expand Down

0 comments on commit 3ef6b69

Please sign in to comment.