Adds output dir variable in task. Adds dry-run description in readme.
This commit is contained in:
+12
-11
@@ -4,6 +4,7 @@ vars:
|
|||||||
PROJECT_NAME: Manuscript
|
PROJECT_NAME: Manuscript
|
||||||
PYTHON: '{{if eq OS "windows"}}python{{else}}python3{{end}}'
|
PYTHON: '{{if eq OS "windows"}}python{{else}}python3{{end}}'
|
||||||
UTILS: "../resources/scripts/task_utils.py"
|
UTILS: "../resources/scripts/task_utils.py"
|
||||||
|
OUTPUT_DIR: "_output"
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
default:
|
default:
|
||||||
@@ -12,43 +13,43 @@ tasks:
|
|||||||
|
|
||||||
render:
|
render:
|
||||||
desc: "Render with the default (non-anonymized) profile, all formats"
|
desc: "Render with the default (non-anonymized) profile, all formats"
|
||||||
cmd: quarto render --profile=default --output-dir _output/default
|
cmd: quarto render --profile=default --output-dir {{.OUTPUT_DIR}}/default
|
||||||
|
|
||||||
render:anonymized:
|
render:anonymized:
|
||||||
desc: "Render with the anonymized profile, all formats"
|
desc: "Render with the anonymized profile, all formats"
|
||||||
cmd: quarto render --profile=anonymized --output-dir _output/anonymized
|
cmd: quarto render --profile=anonymized --output-dir {{.OUTPUT_DIR}}/anonymized
|
||||||
|
|
||||||
render:html:
|
render:html:
|
||||||
desc: "Render to HTML only (default profile)"
|
desc: "Render to HTML only (default profile)"
|
||||||
cmd: quarto render --profile=default --to html --output-dir _output/default
|
cmd: quarto render --profile=default --to html --output-dir {{.OUTPUT_DIR}}/default
|
||||||
|
|
||||||
render:docx:
|
render:docx:
|
||||||
desc: "Render to docx only (default profile)"
|
desc: "Render to docx only (default profile)"
|
||||||
cmd: quarto render --profile=default --to docx --output-dir _output/default
|
cmd: quarto render --profile=default --to docx --output-dir {{.OUTPUT_DIR}}/default
|
||||||
|
|
||||||
render:jats:
|
render:jats:
|
||||||
desc: "Render to JATS XML only (default profile)"
|
desc: "Render to JATS XML only (default profile)"
|
||||||
cmd: quarto render --profile=default --to jats --output-dir _output/default
|
cmd: quarto render --profile=default --to jats --output-dir {{.OUTPUT_DIR}}/default
|
||||||
|
|
||||||
render:pdf:
|
render:pdf:
|
||||||
desc: "Render to PDF only (default profile) - requires pdf format configured in _quarto.yml"
|
desc: "Render to PDF only (default profile) - requires pdf format configured in _quarto.yml"
|
||||||
cmd: quarto render --profile=default --to pdf --output-dir _output/default
|
cmd: quarto render --profile=default --to pdf --output-dir {{.OUTPUT_DIR}}/default
|
||||||
|
|
||||||
package:
|
package:
|
||||||
desc: "Zip the default-profile rendered output into Manuscript-default.zip"
|
desc: "Zip the default-profile rendered output into Manuscript-default.zip"
|
||||||
deps: [render]
|
deps: [render]
|
||||||
cmd: "{{.PYTHON}} {{.UTILS}} zip _output/default {{.PROJECT_NAME}}-default.zip"
|
cmd: "{{.PYTHON}} {{.UTILS}} zip {{.OUTPUT_DIR}}/default {{.PROJECT_NAME}}-default.zip"
|
||||||
sources:
|
sources:
|
||||||
- _output/default/**/*
|
- "{{.OUTPUT_DIR}}/default/**/*"
|
||||||
generates:
|
generates:
|
||||||
- "{{.PROJECT_NAME}}-default.zip"
|
- "{{.PROJECT_NAME}}-default.zip"
|
||||||
|
|
||||||
package:anonymized:
|
package:anonymized:
|
||||||
desc: "Zip the anonymized-profile rendered output into Manuscript-anonymized.zip"
|
desc: "Zip the anonymized-profile rendered output into Manuscript-anonymized.zip"
|
||||||
deps: [render:anonymized]
|
deps: [render:anonymized]
|
||||||
cmd: "{{.PYTHON}} {{.UTILS}} zip _output/anonymized {{.PROJECT_NAME}}-anonymized.zip"
|
cmd: "{{.PYTHON}} {{.UTILS}} zip {{.OUTPUT_DIR}}/anonymized {{.PROJECT_NAME}}-anonymized.zip"
|
||||||
sources:
|
sources:
|
||||||
- _output/anonymized/**/*
|
- "{{.OUTPUT_DIR}}/anonymized/**/*"
|
||||||
generates:
|
generates:
|
||||||
- "{{.PROJECT_NAME}}-anonymized.zip"
|
- "{{.PROJECT_NAME}}-anonymized.zip"
|
||||||
|
|
||||||
@@ -61,5 +62,5 @@ tasks:
|
|||||||
- data.zip
|
- data.zip
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
desc: "Remove _output, .quarto, and stray *_files/*_cache folders"
|
desc: "Remove {{.OUTPUT_DIR}}, .quarto, and stray *_files/*_cache folders"
|
||||||
cmd: "{{.PYTHON}} {{.UTILS}} clean-project ."
|
cmd: "{{.PYTHON}} {{.UTILS}} clean-project ."
|
||||||
|
|||||||
@@ -25,6 +25,13 @@ In any arch-based Linux distro, run `go-task finalize` instead.
|
|||||||
|
|
||||||
More on how to include more detail in the front matter can be found in the official [quarto manual](https://quarto.org/docs/authoring/front-matter.html). Their quick introduction into [Markdown Basics](https://quarto.org/docs/authoring/markdown-basics.html) is also worth reading.
|
More on how to include more detail in the front matter can be found in the official [quarto manual](https://quarto.org/docs/authoring/front-matter.html). Their quick introduction into [Markdown Basics](https://quarto.org/docs/authoring/markdown-basics.html) is also worth reading.
|
||||||
|
|
||||||
|
If you want to know, which command is being run by `task`, use the `--dry` parameter:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
> task manuscript:render:html --dry
|
||||||
|
task: [manuscript:render:html] quarto render --profile=default --to html --output-dir _output/default
|
||||||
|
```
|
||||||
|
|
||||||
## Project layout
|
## Project layout
|
||||||
|
|
||||||
Each of `Manuscript/`, `ResearchReport/`, and `Supplements/` contains a Quarto project with its own `_quarto.yml`, `index.qmd`, `data/`, and `figures/` folders.
|
Each of `Manuscript/`, `ResearchReport/`, and `Supplements/` contains a Quarto project with its own `_quarto.yml`, `index.qmd`, `data/`, and `figures/` folders.
|
||||||
|
|||||||
+11
-10
@@ -4,6 +4,7 @@ vars:
|
|||||||
PROJECT_NAME: ResearchReport
|
PROJECT_NAME: ResearchReport
|
||||||
PYTHON: '{{if eq OS "windows"}}python{{else}}python3{{end}}'
|
PYTHON: '{{if eq OS "windows"}}python{{else}}python3{{end}}'
|
||||||
UTILS: "../resources/scripts/task_utils.py"
|
UTILS: "../resources/scripts/task_utils.py"
|
||||||
|
OUTPUT_DIR: "_output"
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
default:
|
default:
|
||||||
@@ -12,39 +13,39 @@ tasks:
|
|||||||
|
|
||||||
render:
|
render:
|
||||||
desc: "Render with the default (non-anonymized) profile, all formats"
|
desc: "Render with the default (non-anonymized) profile, all formats"
|
||||||
cmd: quarto render --profile=default --output-dir _output/default
|
cmd: quarto render --profile=default --output-dir {{.OUTPUT_DIR}}/default
|
||||||
|
|
||||||
render:anonymized:
|
render:anonymized:
|
||||||
desc: "Render with the anonymized profile, all formats"
|
desc: "Render with the anonymized profile, all formats"
|
||||||
cmd: quarto render --profile=anonymized --output-dir _output/anonymized
|
cmd: quarto render --profile=anonymized --output-dir {{.OUTPUT_DIR}}/anonymized
|
||||||
|
|
||||||
render:html:
|
render:html:
|
||||||
desc: "Render to HTML only (default profile)"
|
desc: "Render to HTML only (default profile)"
|
||||||
cmd: quarto render --profile=default --to html --output-dir _output/default
|
cmd: quarto render --profile=default --to html --output-dir {{.OUTPUT_DIR}}/default
|
||||||
|
|
||||||
render:docx:
|
render:docx:
|
||||||
desc: "Render to docx only (default profile)"
|
desc: "Render to docx only (default profile)"
|
||||||
cmd: quarto render --profile=default --to docx --output-dir _output/default
|
cmd: quarto render --profile=default --to docx --output-dir {{.OUTPUT_DIR}}/default
|
||||||
|
|
||||||
render:pdf:
|
render:pdf:
|
||||||
desc: "Render to PDF only (default profile) - requires pdf format configured in _quarto.yml"
|
desc: "Render to PDF only (default profile) - requires pdf format configured in _quarto.yml"
|
||||||
cmd: quarto render --profile=default --to pdf --output-dir _output/default
|
cmd: quarto render --profile=default --to pdf --output-dir {{.OUTPUT_DIR}}/default
|
||||||
|
|
||||||
package:
|
package:
|
||||||
desc: "Zip the default-profile rendered output into ResearchReport-default.zip"
|
desc: "Zip the default-profile rendered output into ResearchReport-default.zip"
|
||||||
deps: [render]
|
deps: [render]
|
||||||
cmd: "{{.PYTHON}} {{.UTILS}} zip _output/default {{.PROJECT_NAME}}-default.zip"
|
cmd: "{{.PYTHON}} {{.UTILS}} zip {{.OUTPUT_DIR}}/default {{.PROJECT_NAME}}-default.zip"
|
||||||
sources:
|
sources:
|
||||||
- _output/default/**/*
|
- "{{.OUTPUT_DIR}}/default/**/*"
|
||||||
generates:
|
generates:
|
||||||
- "{{.PROJECT_NAME}}-default.zip"
|
- "{{.PROJECT_NAME}}-default.zip"
|
||||||
|
|
||||||
package:anonymized:
|
package:anonymized:
|
||||||
desc: "Zip the anonymized-profile rendered output into ResearchReport-anonymized.zip"
|
desc: "Zip the anonymized-profile rendered output into ResearchReport-anonymized.zip"
|
||||||
deps: [render:anonymized]
|
deps: [render:anonymized]
|
||||||
cmd: "{{.PYTHON}} {{.UTILS}} zip _output/anonymized {{.PROJECT_NAME}}-anonymized.zip"
|
cmd: "{{.PYTHON}} {{.UTILS}} zip {{.OUTPUT_DIR}}/anonymized {{.PROJECT_NAME}}-anonymized.zip"
|
||||||
sources:
|
sources:
|
||||||
- _output/anonymized/**/*
|
- "{{.OUTPUT_DIR}}/anonymized/**/*"
|
||||||
generates:
|
generates:
|
||||||
- "{{.PROJECT_NAME}}-anonymized.zip"
|
- "{{.PROJECT_NAME}}-anonymized.zip"
|
||||||
|
|
||||||
@@ -57,5 +58,5 @@ tasks:
|
|||||||
- data.zip
|
- data.zip
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
desc: "Remove _output, .quarto, and stray *_files/*_cache folders"
|
desc: "Remove {{.OUTPUT_DIR}}, .quarto, and stray *_files/*_cache folders"
|
||||||
cmd: "{{.PYTHON}} {{.UTILS}} clean-project ."
|
cmd: "{{.PYTHON}} {{.UTILS}} clean-project ."
|
||||||
|
|||||||
+11
-11
@@ -1,10 +1,10 @@
|
|||||||
# Supplements/Taskfile.yml
|
|
||||||
version: "3"
|
version: "3"
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
PROJECT_NAME: Supplements
|
PROJECT_NAME: Supplements
|
||||||
PYTHON: '{{if eq OS "windows"}}python{{else}}python3{{end}}'
|
PYTHON: '{{if eq OS "windows"}}python{{else}}python3{{end}}'
|
||||||
UTILS: "../resources/scripts/task_utils.py"
|
UTILS: "../resources/scripts/task_utils.py"
|
||||||
|
OUTPUT_DIR: "_output"
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
default:
|
default:
|
||||||
@@ -13,39 +13,39 @@ tasks:
|
|||||||
|
|
||||||
render:
|
render:
|
||||||
desc: "Render with the default (non-anonymized) profile, all formats"
|
desc: "Render with the default (non-anonymized) profile, all formats"
|
||||||
cmd: quarto render --profile=default --output-dir _output/default
|
cmd: quarto render --profile=default --output-dir {{.OUTPUT_DIR}}/default
|
||||||
|
|
||||||
render:anonymized:
|
render:anonymized:
|
||||||
desc: "Render with the anonymized profile, all formats"
|
desc: "Render with the anonymized profile, all formats"
|
||||||
cmd: quarto render --profile=anonymized --output-dir _output/anonymized
|
cmd: quarto render --profile=anonymized --output-dir {{.OUTPUT_DIR}}/anonymized
|
||||||
|
|
||||||
render:html:
|
render:html:
|
||||||
desc: "Render to HTML only (default profile)"
|
desc: "Render to HTML only (default profile)"
|
||||||
cmd: quarto render --profile=default --to html --output-dir _output/default
|
cmd: quarto render --profile=default --to html --output-dir {{.OUTPUT_DIR}}/default
|
||||||
|
|
||||||
render:docx:
|
render:docx:
|
||||||
desc: "Render to docx only (default profile)"
|
desc: "Render to docx only (default profile)"
|
||||||
cmd: quarto render --profile=default --to docx --output-dir _output/default
|
cmd: quarto render --profile=default --to docx --output-dir {{.OUTPUT_DIR}}/default
|
||||||
|
|
||||||
render:pdf:
|
render:pdf:
|
||||||
desc: "Render to PDF only (default profile) - requires pdf format configured in _quarto.yml"
|
desc: "Render to PDF only (default profile) - requires pdf format configured in _quarto.yml"
|
||||||
cmd: quarto render --profile=default --to pdf --output-dir _output/default
|
cmd: quarto render --profile=default --to pdf --output-dir {{.OUTPUT_DIR}}/default
|
||||||
|
|
||||||
package:
|
package:
|
||||||
desc: "Zip the default-profile rendered output into Supplements-default.zip"
|
desc: "Zip the default-profile rendered output into Supplements-default.zip"
|
||||||
deps: [render]
|
deps: [render]
|
||||||
cmd: "{{.PYTHON}} {{.UTILS}} zip _output/default {{.PROJECT_NAME}}-default.zip"
|
cmd: "{{.PYTHON}} {{.UTILS}} zip {{.OUTPUT_DIR}}/default {{.PROJECT_NAME}}-default.zip"
|
||||||
sources:
|
sources:
|
||||||
- _output/default/**/*
|
- "{{.OUTPUT_DIR}}/default/**/*"
|
||||||
generates:
|
generates:
|
||||||
- "{{.PROJECT_NAME}}-default.zip"
|
- "{{.PROJECT_NAME}}-default.zip"
|
||||||
|
|
||||||
package:anonymized:
|
package:anonymized:
|
||||||
desc: "Zip the anonymized-profile rendered output into Supplements-anonymized.zip"
|
desc: "Zip the anonymized-profile rendered output into Supplements-anonymized.zip"
|
||||||
deps: [render:anonymized]
|
deps: [render:anonymized]
|
||||||
cmd: "{{.PYTHON}} {{.UTILS}} zip _output/anonymized {{.PROJECT_NAME}}-anonymized.zip"
|
cmd: "{{.PYTHON}} {{.UTILS}} zip {{.OUTPUT_DIR}}/anonymized {{.PROJECT_NAME}}-anonymized.zip"
|
||||||
sources:
|
sources:
|
||||||
- _output/anonymized/**/*
|
- "{{.OUTPUT_DIR}}/anonymized/**/*"
|
||||||
generates:
|
generates:
|
||||||
- "{{.PROJECT_NAME}}-anonymized.zip"
|
- "{{.PROJECT_NAME}}-anonymized.zip"
|
||||||
|
|
||||||
@@ -58,5 +58,5 @@ tasks:
|
|||||||
- data.zip
|
- data.zip
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
desc: "Remove _output, .quarto, and stray *_files/*_cache folders"
|
desc: "Remove {{.OUTPUT_DIR}}, .quarto, and stray *_files/*_cache folders"
|
||||||
cmd: "{{.PYTHON}} {{.UTILS}} clean-project ."
|
cmd: "{{.PYTHON}} {{.UTILS}} clean-project ."
|
||||||
|
|||||||
Reference in New Issue
Block a user