continuing refactor
This commit is contained in:
@@ -19,7 +19,7 @@ The FTP plugin demonstrates the main provider hooks that matter for a storage-st
|
||||
- `search()` walks an FTP directory tree and returns `SearchResult` rows.
|
||||
- `selector()` turns folder rows into a follow-up table when the user runs `@N`.
|
||||
- `download()` and `download_url()` fetch FTP files into `download-file` output paths.
|
||||
- `resolve_pipe_result_download()` lets `@N | add-file -store ...` materialize a remote FTP file first.
|
||||
- `resolve_pipe_result_download()` lets `@N | add-file -instance ...` materialize a remote FTP file first.
|
||||
- `upload()` lets `add-file -plugin ftp -instance <name> -path ...` push a local file to the configured FTP server.
|
||||
|
||||
## Example Config
|
||||
@@ -114,11 +114,11 @@ search-file -plugin ftp -instance work "report"
|
||||
@1 | download-file -path C:\Downloads
|
||||
```
|
||||
|
||||
If you want to ingest the selected FTP file into a configured store backend:
|
||||
If you want to ingest the selected FTP file into a configured instance backend:
|
||||
|
||||
```powershell
|
||||
search-file -plugin ftp -instance work "report"
|
||||
@1 | add-file -store tutorial
|
||||
@1 | add-file -instance tutorial
|
||||
```
|
||||
|
||||
Why this works:
|
||||
@@ -150,7 +150,7 @@ That split is what keeps these two user experiences compatible:
|
||||
|
||||
- `@N` on a folder opens a new table
|
||||
- `@N` on a file downloads the file
|
||||
- `@N | add-file -store ...` first downloads, then ingests
|
||||
- `@N | add-file -instance ...` first downloads, then ingests
|
||||
|
||||
## Implementation Notes
|
||||
|
||||
@@ -169,6 +169,6 @@ search-file -plugin ftp -instance work "*"
|
||||
search-file -plugin ftp -instance work "path:/incoming depth:2 *.pdf"
|
||||
@1
|
||||
@1 | download-file -path C:\Downloads
|
||||
@1 | add-file -store tutorial
|
||||
@1 | add-file -instance tutorial
|
||||
add-file -plugin ftp -instance archive -path C:\Media\report.pdf
|
||||
```
|
||||
@@ -9,7 +9,7 @@ Key ideas
|
||||
|
||||
Example:
|
||||
|
||||
plugin-table -plugin example -sample | @1 | add-file -store default
|
||||
plugin-table -plugin example -sample | @1 | add-file -instance default
|
||||
|
||||
What plugins must implement
|
||||
- An adapter that yields `ResultModel` objects (breaking API).
|
||||
|
||||
@@ -14,7 +14,7 @@ The SCP plugin mirrors the FTP walkthrough, but on top of SSH:
|
||||
- `search-file -plugin scp -instance <name> ...` lists remote files and folders over SFTP.
|
||||
- plain `@N` on a folder drills into that directory.
|
||||
- plain `@N` on a file runs `download-file -plugin scp -instance <name> -url ...`.
|
||||
- `@N | add-file -store ...` downloads first, then ingests the local temp file.
|
||||
- `@N | add-file -instance ...` downloads first, then ingests the local temp file.
|
||||
- `add-file -plugin scp -instance <name> -path ...` uploads a local file to the configured remote path.
|
||||
|
||||
## Example Config
|
||||
@@ -105,11 +105,11 @@ search-file -plugin scp -instance work "report"
|
||||
@1 | download-file -path C:\Downloads
|
||||
```
|
||||
|
||||
Ingest a selected remote file into a configured store backend:
|
||||
Ingest a selected remote file into a configured instance backend:
|
||||
|
||||
```powershell
|
||||
search-file -plugin scp -instance work "report"
|
||||
@1 | add-file -store tutorial
|
||||
@1 | add-file -instance tutorial
|
||||
```
|
||||
|
||||
Why this works:
|
||||
@@ -141,6 +141,6 @@ search-file -plugin scp -instance work "*"
|
||||
search-file -plugin scp -instance work "path:/srv/files depth:2 *.zip"
|
||||
@1
|
||||
@1 | download-file -path C:\Downloads
|
||||
@1 | add-file -store tutorial
|
||||
@1 | add-file -instance tutorial
|
||||
add-file -plugin scp -instance archive -path C:\Media\report.pdf
|
||||
```
|
||||
Reference in New Issue
Block a user