Monday, 27 August 2018

Formatting buffer from console in node / electron app

Hi all, I am working on an app that takes results from a terminal command, like “cd desktop\n ls\n”, and displays it in the UI window. I’ve been able to convert the buffer with .toString(‘utf8’).split(RegEx stuff) etc, and I can get the data formatted, kinda, but what I’m hoping to do is just clone what the output would look like as if you were actually looking at the console. Is there a module or easier way to do this out of the box somewhere? Any suggestions appreciated.Edit: a word

Submitted August 27, 2018 at 09:30PM by cinema-tech-on-call

No comments:

Post a Comment