You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**`true` (default)**: Includes YAML frontmatter as commented lines at the top of each script
70
73
-**`false`**: Extracts only code with no YAML comments
71
74
75
+
### Option: `script-links-position`
76
+
77
+
Controls where the "Script file(s)" section with links to generated scripts appears:
78
+
79
+
-**`"bottom"` (default)**: Places the section at the end of the document
80
+
-**`"top"`**: Places the section at the beginning of the document
81
+
-**`"custom"`**: Places the section where you define a div with `id="ripper-links"` in your document
82
+
-**`"none"`**: Suppresses the section entirely
83
+
84
+
#### Custom Positioning Example
85
+
86
+
- To place the section at a specific location in your document, use `script-links-position: "custom"` and add a div with the id `ripper-links`.
87
+
88
+
````md
89
+
---
90
+
title: "My Analysis"
91
+
filters:
92
+
- ripper
93
+
extensions:
94
+
ripper:
95
+
script-links-position: "custom"
96
+
---
97
+
98
+
## Introduction
99
+
100
+
Some introductory text here.
101
+
102
+
::: {#ripper-links}
103
+
:::
104
+
105
+
## Analysis
106
+
107
+
```{{r}}
108
+
# Your code here
109
+
```
110
+
````
111
+
112
+
113
+
### Option: `output-name`
114
+
115
+
- Allows you to specify a custom base name for the generated script files instead of using the document name.
116
+
- For example, if you set `output-name: "my-custom-name"`, rendering `my-analysis.qmd` would produce:
117
+
-`my-custom-name.R`
118
+
-`my-custom-name.py`
119
+
120
+
### Option: `debug`
121
+
122
+
- Enables verbose logging to help troubleshoot issues or understand the extension's behavior.
123
+
124
+
72
125
## Supported Languages
73
126
74
127
16 languages supported with appropriate file extensions and comment styles:
@@ -92,3 +145,16 @@ extensions:
92
145
| Perl | .pl | #' |
93
146
| PHP | .php | //' |
94
147
148
+
## See Also
149
+
150
+
### Related Quarto Extensions
151
+
152
+
1.**[sorting-hat](https://github.com/coatless-quarto/sorting-hat)**: Conditionally retain or omit code blocks by language in rendered documents.
153
+
- Use with ripper to control what appears in your document while extracting all visible code to scripts.
154
+
2.**[regurgitate](https://github.com/coatless-quarto/regurgitate)**: Automatically create code appendices in your rendered document, organized by language or document order.
155
+
- Complements ripper by providing in-document code listings while ripper creates external executable files.
156
+
157
+
### Historical Context
158
+
159
+
Ripper's ability to extract code from Quarto documents originated a feature request I submitted in
160
+
[`quarto-dev/quarto-cli` issue #1156](https://github.com/quarto-dev/quarto-cli/issues/1156) back on June 14, 2022.
0 commit comments