HTML Mirror Rewrite

action_html_mirror_rewrite · action · Utility · Available · v1.0.0

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.

⚙️ Configuration parameters

Fields shown in the editor when configuring the node. Generated directly from the NodeDefconfigFields.

FieldTypeRequiredDefaultDescription
html
HTML sorgente
string (multiline)yes
{{$node.spider.json.pages[0].html}}
HTML completo della pagina. Tipicamente da action_recursive_spider o action_web_fetch_advanced.
pageUrl
URL pagina sorgente
stringyes
https://example.com/blog/post-1/
URL assoluto della pagina originale. Necessario per risolvere link relativi prima di mapparli.
htmlSaveDir
Directory dove salverai l'HTML
stringyes
/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.
assetMap
Asset map (url → local path)
JSON object/arrayno{}JSON object {url assoluto: percorso filesystem}. Tipicamente {{$node.asset_download.json.stats.assetMap}}. URL non in mappa restano assoluti.
stripQuery
Rimuovi query string
booleannotrueSe ON, i path locali NON includono "?foo=bar". Default ON perché le query non hanno senso su file:// locale.
stripFragment
Rimuovi fragment (#anchor)
booleannofalseSe OFF (default), i "#anchor" vengono preservati — VLC/browser li onorano anche su file://. ON solo per output puramente statico.

💡 Configuration example

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
  }
}

🔗 Related nodes in the same category

Ready to use HTML Mirror Rewrite?

Available now on all FlowForge plans. Try it free without a credit card.

Start freeBrowse all nodes