6e02c2d31e
- lib/bridge.js createAssetLink: POST <nextcloudUrl>/apps/richdocuments/assets (utan index.php), Content-Type application/x-www-form-urlencoded med body path=<urlencoded>, path trimmad utan ledande slash (userFolder->get relativt filrot), OCS-APIRequest borttagen. Fel inkluderar statusCode + svarskropp. - Intern collaboraUrl är HTTP: http://code:9980 (fallback http://<bridge-ip>:9980) i nc-collab-config default, .env.example, example-flows.json, docker-compose, install.sh och integrate-into-nodered.sh resolve_collabora_url. - Publik WOPI-URL dokumenterad som https://docs.domain.name. - package-lock.json för deterministisk form-data-install i Docker.
194 lines
4.6 KiB
JSON
194 lines
4.6 KiB
JSON
[
|
|
{
|
|
"id": "collab_tab",
|
|
"type": "tab",
|
|
"label": "NC Collabora — examples",
|
|
"disabled": false,
|
|
"info": "Create nc-collab-config first (gear menu). Set FILL_IN_USER and app password.\n\n1. capabilities — is CODE up?\n2. ncFileToPdf — PDF in OfficeOut\n3. document:direct — editorUrl\n\nSee docs/NODES.md"
|
|
},
|
|
{
|
|
"id": "nc_collab_cfg",
|
|
"type": "nc-collab-config",
|
|
"name": "cloud.domain.name",
|
|
"nextcloudUrl": "https://cloud.domain.name",
|
|
"collaboraUrl": "http://code:9980",
|
|
"collaboraPublicUrl": "https://cloud.domain.name",
|
|
"username": "FILL_IN_USER",
|
|
"verifyTls": false
|
|
},
|
|
{
|
|
"id": "inj_capabilities",
|
|
"type": "inject",
|
|
"z": "collab_tab",
|
|
"name": "1. CODE capabilities",
|
|
"props": [],
|
|
"repeat": "",
|
|
"crontab": "",
|
|
"once": false,
|
|
"topic": "",
|
|
"x": 150,
|
|
"y": 80,
|
|
"wires": [["wopi_cap"]]
|
|
},
|
|
{
|
|
"id": "wopi_cap",
|
|
"type": "collabora-wopi",
|
|
"z": "collab_tab",
|
|
"name": "capabilities",
|
|
"config": "nc_collab_cfg",
|
|
"operation": "capabilities",
|
|
"x": 380,
|
|
"y": 80,
|
|
"wires": [["dbg_cap"]]
|
|
},
|
|
{
|
|
"id": "dbg_cap",
|
|
"type": "debug",
|
|
"z": "collab_tab",
|
|
"name": "capabilities JSON",
|
|
"active": true,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "payload",
|
|
"x": 590,
|
|
"y": 80,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "inj_pdf",
|
|
"type": "inject",
|
|
"z": "collab_tab",
|
|
"name": "2. NC-fil → PDF",
|
|
"props": [
|
|
{
|
|
"p": "ncPath",
|
|
"v": "/Dokument/test.docx",
|
|
"vt": "str"
|
|
}
|
|
],
|
|
"repeat": "",
|
|
"crontab": "",
|
|
"once": false,
|
|
"topic": "",
|
|
"x": 150,
|
|
"y": 160,
|
|
"wires": [["bridge_pdf"]]
|
|
},
|
|
{
|
|
"id": "bridge_pdf",
|
|
"type": "collabora-bridge",
|
|
"z": "collab_tab",
|
|
"name": "ncFileToPdf",
|
|
"config": "nc_collab_cfg",
|
|
"operation": "ncFileToPdf",
|
|
"x": 380,
|
|
"y": 160,
|
|
"wires": [["dbg_pdf"]]
|
|
},
|
|
{
|
|
"id": "dbg_pdf",
|
|
"type": "debug",
|
|
"z": "collab_tab",
|
|
"name": "destNcPath",
|
|
"active": true,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "destNcPath",
|
|
"x": 590,
|
|
"y": 160,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "inj_editor",
|
|
"type": "inject",
|
|
"z": "collab_tab",
|
|
"name": "3. Open in Office",
|
|
"props": [
|
|
{
|
|
"p": "ncPath",
|
|
"v": "/Dokument/test.docx",
|
|
"vt": "str"
|
|
}
|
|
],
|
|
"repeat": "",
|
|
"crontab": "",
|
|
"once": false,
|
|
"topic": "",
|
|
"x": 150,
|
|
"y": 240,
|
|
"wires": [["office_direct"]]
|
|
},
|
|
{
|
|
"id": "office_direct",
|
|
"type": "nc-office",
|
|
"z": "collab_tab",
|
|
"name": "document:direct",
|
|
"config": "nc_collab_cfg",
|
|
"operation": "document:direct",
|
|
"x": 380,
|
|
"y": 240,
|
|
"wires": [["dbg_editor"]]
|
|
},
|
|
{
|
|
"id": "dbg_editor",
|
|
"type": "debug",
|
|
"z": "collab_tab",
|
|
"name": "editorUrl",
|
|
"active": true,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "editorUrl",
|
|
"x": 590,
|
|
"y": 240,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "inj_extract",
|
|
"type": "inject",
|
|
"z": "collab_tab",
|
|
"name": "4. Template fields",
|
|
"props": [
|
|
{
|
|
"p": "ncPath",
|
|
"v": "/Mallar/avtal.docx",
|
|
"vt": "str"
|
|
}
|
|
],
|
|
"repeat": "",
|
|
"crontab": "",
|
|
"once": false,
|
|
"topic": "",
|
|
"x": 150,
|
|
"y": 320,
|
|
"wires": [["bridge_extract"]]
|
|
},
|
|
{
|
|
"id": "bridge_extract",
|
|
"type": "collabora-bridge",
|
|
"z": "collab_tab",
|
|
"name": "extractToPayload",
|
|
"config": "nc_collab_cfg",
|
|
"operation": "extractToPayload",
|
|
"x": 390,
|
|
"y": 320,
|
|
"wires": [["dbg_fields"]]
|
|
},
|
|
{
|
|
"id": "dbg_fields",
|
|
"type": "debug",
|
|
"z": "collab_tab",
|
|
"name": "fields / structure",
|
|
"active": true,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "fields",
|
|
"x": 610,
|
|
"y": 320,
|
|
"wires": []
|
|
}
|
|
]
|