Skip to content

Commit

Permalink
#10 Update documention
Browse files Browse the repository at this point in the history
  • Loading branch information
clever-age-gtonon committed Dec 11, 2024
1 parent c2a7f6f commit ce388b9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
14 changes: 10 additions & 4 deletions docs/reference/tasks/01-FileFetchTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,29 @@ Options
Examples
--------

* Simple fetch task configuration
- See config/packages/flysystem.yaml to see configured flysystems/storages.
- copy all .csv files from 'storage.source' to 'storage.destination'
- remove .csv from 'storage.source' after copy
- output will be filename of copied files
```yaml
# Task configuration level
code:
service: '@CleverAge\FlysystemProcessBundle\Task\FileFetchTask'
description: >
Download all .csv files from storage.source to storage.destination.
See config/packages/flysystem.yaml to see configured flysystem/storages.
options:
source_filesystem: 'storage.source'
destination_filesystem: 'storage.destination'
file_pattern: '/.csv$/'
remove_source: true
```
* Simple fetch process configuration to cipy a specific file from --input option via <br> ```bin/console cleverage:process:execute my_custom_process --input=foobar.csv -vv```
- See config/packages/flysystem.yaml to see configured flysystems/storages.
- copy input file from 'storage.source' to 'storage.destination'
- remove .csv from 'storage.source' after copy
- output will be filename of copied file
```yaml
# Full process configuration to use input as filename with the following call
# bin/console cleverage:process:execute my_custom_process --input=foobar.csv -vv
my_custom_process:
entry_point: copy_from_input
tasks:
Expand Down
9 changes: 4 additions & 5 deletions docs/reference/tasks/02-ListContentTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,14 @@ Options

Examples
--------

* Simple list task configuration from a filesystem
- see config/packages/flysystem.yaml to see configured flysystems/storages.
- list all .csv files from 'storage.source'
- output will be League\Flysystem\StorageAttributes representation of copied files
```yaml
# Task configuration level
code:
service: '@CleverAge\FlysystemProcessBundle\Task\ListContentTask'
description: >
List .csv files from storage.source.
See config/packages/flysystem.yaml to see configured flysystem/storages.
outputs: get_file_path
options:
filesystem: 'storage.source'
file_pattern: '/.csv$/'
Expand Down
6 changes: 4 additions & 2 deletions docs/reference/tasks/03-RemoveFileTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ Options

Examples
--------

* Simple process to remove a file on 'storage.source' via <br>```bin/console cleverage:process:execute my_custom_process --input=foobar.csv -vv```
- see config/packages/flysystem.yaml to see configured flysystems/storages.
- remove file with name passed as input
```yaml
# bin/console cleverage:process:execute my_custom_process --input=foobar.csv -vv
#
my_custom_process:
entry_point: remove_from_input
tasks:
Expand Down

0 comments on commit ce388b9

Please sign in to comment.