feat(plugins): add joplin-api and send-sms under repo-root plugins/
Load user plugins from /plugins instead of data/plugins so site-specific scripts stay in git and workflows can reference plugin/joplin-api and plugin/send-sms. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
name: Joplin nightly daily log
|
||||
description: |
|
||||
POST joplin-auto /api/logs/run at 04:00 (sync + yearly/monthly/today), then ntfy.
|
||||
Secret joplin_setup_token (SETUP_API_TOKEN). Variable ntfy_channel.
|
||||
scripts:
|
||||
- script: plugin/joplin-api
|
||||
config:
|
||||
url: http://10.8.0.6:3040/api/logs/run
|
||||
method: POST
|
||||
token: $SECRET_joplin_setup_token
|
||||
timeoutMs: 600000
|
||||
- set:
|
||||
expression: |
|
||||
{
|
||||
"title": data.ok ? "Bullet journal" : "Bullet journal failed",
|
||||
"message": data.ok
|
||||
? "The bullet journal for " & data.httpResponse.date & " has been created."
|
||||
: data.message
|
||||
}
|
||||
- script: ntfy.js
|
||||
config:
|
||||
url: $VAR_ntfy_channel
|
||||
triggers:
|
||||
- type: cron
|
||||
schedule: "0 4 * * *"
|
||||
- type: HTTP
|
||||
method: POST
|
||||
path: /dev-joplin-daily
|
||||
enabled: false
|
||||
@@ -0,0 +1,17 @@
|
||||
name: Joplin get note
|
||||
description: |
|
||||
GET a Joplin note by id from joplin-api. Input (data): id (32-char hex).
|
||||
Secret joplin_api_token (JOPLIN_API_TOKEN / API_KEYS). Returns the full note.
|
||||
scripts:
|
||||
- script: plugin/joplin-api
|
||||
config:
|
||||
url: http://10.8.0.6:3030/notes
|
||||
method: GET
|
||||
token: $SECRET_joplin_api_token
|
||||
timeoutMs: 60000
|
||||
triggers:
|
||||
- type: workflow
|
||||
- type: HTTP
|
||||
method: POST
|
||||
path: /dev-joplin-get-note
|
||||
enabled: false
|
||||
@@ -0,0 +1,27 @@
|
||||
name: Joplin nightly sync
|
||||
description: |
|
||||
POST joplin-auto /api/sync at 03:00, then ntfy success or failure.
|
||||
Secret joplin_setup_token (SETUP_API_TOKEN). Variable ntfy_channel.
|
||||
scripts:
|
||||
- script: plugin/joplin-api
|
||||
config:
|
||||
url: http://10.8.0.6:3040/api/sync
|
||||
method: POST
|
||||
token: $SECRET_joplin_setup_token
|
||||
timeoutMs: 600000
|
||||
- set:
|
||||
expression: |
|
||||
{
|
||||
"title": data.ok ? "Joplin sync ok" : "Joplin sync failed",
|
||||
"message": data.message
|
||||
}
|
||||
- script: ntfy.js
|
||||
config:
|
||||
url: $VAR_ntfy_channel
|
||||
triggers:
|
||||
- type: cron
|
||||
schedule: "0 3 * * *"
|
||||
- type: HTTP
|
||||
method: POST
|
||||
path: /dev-joplin-sync
|
||||
enabled: false
|
||||
@@ -0,0 +1,16 @@
|
||||
name: dev-zte-sms
|
||||
description: |
|
||||
Send an SMS via a ZTE modem web UI.
|
||||
Input (data): to, message
|
||||
Password is the named secret zte_modem_password ($SECRET_).
|
||||
scripts:
|
||||
- script: plugin/send-sms
|
||||
config:
|
||||
url: http://192.168.5.1/reqproc/proc_post
|
||||
password: $SECRET_sms_secret
|
||||
triggers:
|
||||
- type: workflow
|
||||
- type: HTTP
|
||||
method: POST
|
||||
path: /dev-zte-sms
|
||||
auth: basic-auth
|
||||
Reference in New Issue
Block a user