This commit is contained in:
14
readme.md
14
readme.md
@@ -24,7 +24,7 @@ functions:
|
||||
image: registry.coadcorp.com/export-xlsx:1.0
|
||||
type: knative-workflow
|
||||
```
|
||||
#### Rely on Direktiv to create input file
|
||||
#### Basic
|
||||
```yaml
|
||||
- id: export-xlsx
|
||||
type: action
|
||||
@@ -38,16 +38,19 @@ functions:
|
||||
worksheet-name: "TestSpreadsheet"
|
||||
out-filename: example.xlsx
|
||||
```
|
||||
#### Use function to create input file
|
||||
#### Use jq to add a parent key 'input' containing array of objects
|
||||
```yaml
|
||||
- id: export-xlsx
|
||||
type: action
|
||||
action:
|
||||
function: export-xlsx
|
||||
input:
|
||||
input:
|
||||
files:
|
||||
- name: input.json
|
||||
data: |
|
||||
jq(.array | {input: . } | tostring )
|
||||
worksheet-name: "TestSpreadsheet"
|
||||
out-filename: example.xlsx
|
||||
in-data: jq(.array | tostring)
|
||||
out-filename: example.xlsx
|
||||
```
|
||||
|
||||
### Secrets
|
||||
@@ -113,7 +116,6 @@ functions:
|
||||
| Name | Type | Go type | Required | Default | Description | Example |
|
||||
|------|------|---------|:--------:| ------- |-------------|---------|
|
||||
| files | [][DirektivFile](#direktiv-file)| `[]apps.DirektivFile` | | | File to create before running commands. | |
|
||||
| in-data | [interface{}](#interface)| `interface{}` | | | json input to convert to spreadsheet | |
|
||||
| infile | string| `string` | | | Name of the json input file to utilise | |
|
||||
| out-filename | string| `string` | ✓ | `"output.xlsx"`| the filename of the output spreadsheet | |
|
||||
| worksheet-name | string| `string` | ✓ | `"Sheet1"`| Label for the worksheet created in the spreadsheet | |
|
||||
|
Reference in New Issue
Block a user