node-red-contrib-turndown

0.0.2 • Public • Published

Turndown NodeRED Node

Install

npm install -g node-red-contrib-turndown

Usage

Expects a msg.payload with html string

parameter example

msg = {};
msg.payload = '<ul>'
msg.payload += '  <li>Coffee</li>'
msg.payload += '  <li>Tea</li>'
msg.payload += '  <li>Milk</li>'
msg.payload += '</ul>'
return msg;

Buy Me A Coffee

response

*   Coffee
*   Tea
*   Milk

sample flow

Flows can be imported and exported from the editor using their JSON format, making it very easy to share flows with others.

  • Importing flows - pasting in the flow JSON directly
  • Menu - Import - Clipboard - Ctrl+v - Import button
[{"id":"16dfa21a.3f416e","type":"inject","z":"f4f9470c.ca80e8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":100,"y":80,"wires":[["f2bfa294.631ff"]]},{"id":"18978777.2678e9","type":"turndown","z":"f4f9470c.ca80e8","name":"Parse HTML to markdown","x":510,"y":80,"wires":[["1ca02f43.6ec151"]]},{"id":"1ca02f43.6ec151","type":"debug","z":"f4f9470c.ca80e8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":750,"y":80,"wires":[]},{"id":"f2bfa294.631ff","type":"function","z":"f4f9470c.ca80e8","name":"","func":"msg = {};\nmsg.payload = '<ul>'\nmsg.payload += '  <li>Coffee</li>'\nmsg.payload += '  <li>Tea</li>'\nmsg.payload += '  <li>Milk</li>'\nmsg.payload += '</ul>'\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":280,"y":80,"wires":[["18978777.2678e9"]]}]
 

Readme

Keywords

Package Sidebar

Install

npm i node-red-contrib-turndown

Weekly Downloads

3

Version

0.0.2

License

ISC

Unpacked Size

5.47 kB

Total Files

5

Last publish

Collaborators

  • gagagiga