Needing to quickly parse text with more powerful tools than your typical text editor, i.e. using sed, grep, awk, etc., sometimes together. It's a pain to use these tools easily because they're non-interactive and command-line based. Testing out commands to see what works involves a lot of back and forth.

How it works

Enter in an input to the right text box and chain as many commands together as you'd like using a dropdown to select from a list of text stream commands. Get feedback on syntax errors. Show a visual diff at each step of the process to see what your command changed. Command reference with short descriptions and links to docs/examples.

Challenges I ran into

Finding a good visual diff library. Ended up forking a Google open-source library called google-diff-patch-match, extracting the diff functionality into a node module, and modifying the HTML output to make it more reusable.

Secure deployment: Because this project allows anonymous users to directly run commands on your server, it's a huge security risk if not implemented well. Python's subprocess module handles preventing shell injection, but something like a chroot jail is needed to prevent anyone from accessing files on the filesystem.

What I learned

How to use Browserify with React, how to structure a Flask application, how to actually use Linux text manipulation commands.

What's next for Stream Editor

Actual deployment! Need to figure out the chroot jail stuff. Better tooltips/hints/error messages. Support for more commands (Perl, maybe)?

Share this project: