Click to Expand Module Export Code
JSON - Copy and Paste this directly in the scenario editor
{
"subflows": [
{
"flow": [
{
"id": 163,
"module": "util:ComposeTransformer",
"version": 1,
"parameters": {},
"mapper": {
"value": "# August 2024 News And Updates\n## Sports\n### Basketball\nOptional related content & text..\n### Ping Pong\nOptional related content & text..\n## Business\n### Technology\nOptional related content & text..\n# News From Last Week\n## Business\n### Technology\nOptional related content & text..\n## Arts"
},
"metadata": {
"designer": {
"x": 2507,
"y": -2963
},
"restore": {},
"expect": [
{
"name": "value",
"type": "text",
"label": "Text"
}
]
}
},
{
"id": 164,
"module": "regexp:Parser",
"version": 1,
"parameters": {
"pattern": "(?<=^|\\n)(?<num>#+)\\s+(?<header>[^\\n]+)",
"global": true,
"sensitive": true,
"multiline": false,
"singleline": false,
"continueWhenNoRes": false,
"ignoreInfiniteLoopsWhenGlobal": false
},
"mapper": {
"text": "{{replace(163.value; \"/(?<=\\n)#\\s[\\w\\W]+?$/\"; emptystring)}}"
},
"metadata": {
"designer": {
"x": 2751,
"y": -2963
},
"restore": {
"parameters": {
"sensitive": {
"collapsed": true
},
"multiline": {
"collapsed": true
},
"singleline": {
"collapsed": true
},
"continueWhenNoRes": {
"collapsed": true
}
}
},
"parameters": [
{
"name": "pattern",
"type": "text",
"label": "Pattern",
"required": true
},
{
"name": "global",
"type": "boolean",
"label": "Global match",
"required": true
},
{
"name": "sensitive",
"type": "boolean",
"label": "Case sensitive",
"required": true
},
{
"name": "multiline",
"type": "boolean",
"label": "Multiline",
"required": true
},
{
"name": "singleline",
"type": "boolean",
"label": "Singleline",
"required": true
},
{
"name": "continueWhenNoRes",
"type": "boolean",
"label": "Continue the execution of the route even if the module finds no matches",
"required": true
},
{
"name": "ignoreInfiniteLoopsWhenGlobal",
"type": "boolean",
"label": "Ignore errors when there is an infinite search loop",
"required": true
}
],
"expect": [
{
"name": "text",
"type": "text",
"label": "Text"
}
],
"interface": [
{
"type": "text",
"name": "num",
"label": "num"
},
{
"type": "text",
"name": "header",
"label": "header"
},
{
"type": "uinteger",
"name": "i",
"label": "i"
},
{
"type": "any",
"name": "__IMTMATCH__",
"label": "Fallback Match"
}
]
}
},
{
"id": 167,
"module": "util:SetVariable2",
"version": 1,
"parameters": {},
"mapper": {
"name": "num",
"scope": "roundtrip",
"value": "{{parseNumber(replace(replace(replace(164.num; \"###\"; 3); \"##\"; 2); \"#\"; 1))}}"
},
"metadata": {
"designer": {
"x": 2993,
"y": -2965
},
"restore": {
"expect": {
"scope": {
"label": "One cycle"
}
}
},
"expect": [
{
"name": "name",
"type": "text",
"label": "Variable name",
"required": true
},
{
"name": "scope",
"type": "select",
"label": "Variable lifetime",
"required": true,
"validate": {
"enum": [
"roundtrip",
"execution"
]
}
},
{
"name": "value",
"type": "any",
"label": "Variable value"
}
],
"interface": [
{
"name": "num",
"label": "num",
"type": "any"
}
]
}
},
{
"id": 168,
"module": "builtin:BasicAggregator",
"version": 1,
"parameters": {
"feeder": 164
},
"mapper": {
"num": "{{167.num}}",
"header": "{{164.header}}"
},
"metadata": {
"designer": {
"x": 3235,
"y": -2968,
"messages": [
{
"category": "last",
"severity": "warning",
"message": "A transformer should not be the last module in the route."
}
]
},
"restore": {
"extra": {
"feeder": {
"label": "Text parser - Match pattern"
},
"target": {
"label": "Custom"
}
}
}
}
}
]
}
],
"metadata": {
"version": 1
}
}
Hope this helps! Let me know if there are any further questions or issues.
You can also join us in the Make Fans Discord server to chat with other makers. Due to the evolving needs of this community, the Discord invite link can be found elsewhere on this forum. You can either search for it or leave a message below to request an invite.