Introduce plugin/<id> installs (zip, HTTPS git, example, fork), jerapah-plugin.json manifests with jerapah semver ranges, isolated plugin dirs under data/plugins, and app version 0.1.0. Core scripts are non-editable; get-current-time moves to examples/plugins. Co-authored-by: Nasyarobby Putra <nasyarobby@gmail.com>
38 lines
926 B
YAML
38 lines
926 B
YAML
name: time and comic to ntfy
|
|
description: >
|
|
Fan-in from two scripts (current time + monkeyuser comic), then send to ntfy.
|
|
scripts:
|
|
- id: time
|
|
script: plugin/get-current-time
|
|
|
|
- id: comic
|
|
script: fetch-html.js
|
|
config:
|
|
url: "https://www.monkeyuser.com/"
|
|
outputVar: "httpResponse"
|
|
selector: ".comic img"
|
|
jsonata: |
|
|
{"url": "https://www.monkeyuser.com" & [attributes.src][0], "title": [attributes.title][0]}
|
|
|
|
- id: compose
|
|
script: jsonata.js
|
|
needs: [time, comic]
|
|
config:
|
|
expression: |
|
|
{
|
|
"title": data.comic.httpResponse.title,
|
|
"message": data.time.datetime & " " & data.comic.httpResponse.title,
|
|
"attach": data.comic.httpResponse.url
|
|
}
|
|
|
|
- id: notify
|
|
script: ntfy.js
|
|
needs: [compose]
|
|
config:
|
|
url: https://ntfy.sh/jerapah-flow
|
|
|
|
triggers:
|
|
- type: HTTP
|
|
method: POST
|
|
path: /time-and-comic
|