Description
Rewrite an HTML page for offline navigation like wget --mirror: absolute asset URLs (img/css/js/video/iframe, srcset included) become local relative paths based on the asset map produced by Asset Batch Download.
action_html_mirror_rewrite · action · Utility · Available · v1.0.0
Rewrite an HTML page for offline navigation like wget --mirror: absolute asset URLs (img/css/js/video/iframe, srcset included) become local relative paths based on the asset map produced by Asset Batch Download.
Fields shown in the editor when configuring the node. Generated directly from the NodeDefconfigFields.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
htmlHTML sorgente | string (multiline) | yes | — {{$node.spider.json.pages[0].html}} | HTML completo della pagina. Tipicamente da action_recursive_spider o action_web_fetch_advanced. |
pageUrlURL pagina sorgente | string | yes | — https://example.com/blog/post-1/ | URL assoluto della pagina originale. Necessario per risolvere link relativi prima di mapparli. |
htmlSaveDirDirectory dove salverai l'HTML | string | yes | — /opt/mirror/zelistore.it/blog/post-1 | Path assoluto della cartella in cui scriverai l'HTML output. Tutti i link locali vengono calcolati relativi a QUESTA directory. |
assetMapAsset map (url → local path) | JSON object/array | no | {} | JSON object {url assoluto: percorso filesystem}. Tipicamente {{$node.asset_download.json.stats.assetMap}}. URL non in mappa restano assoluti. |
stripQueryRimuovi query string | boolean | no | true | Se ON, i path locali NON includono "?foo=bar". Default ON perché le query non hanno senso su file:// locale. |
stripFragmentRimuovi fragment (#anchor) | boolean | no | false | Se OFF (default), i "#anchor" vengono preservati — VLC/browser li onorano anche su file://. ON solo per output puramente statico. |
JSON snippet of the node as it appears in the workflow. Values are derived fromdefaultValue and from required parameters.
{
"id": "node-action_html_mirror_rewrite-1",
"defId": "action_html_mirror_rewrite",
"label": "HTML Mirror Rewrite",
"config": {
"html": "{{$node.spider.json.pages[0].html}}",
"pageUrl": "https://example.com/blog/post-1/",
"htmlSaveDir": "/opt/mirror/zelistore.it/blog/post-1",
"assetMap": "{}",
"stripQuery": true,
"stripFragment": false
}
}Available now on all FlowForge plans. Try it free without a credit card.
Start freeBrowse all nodes