So I’ve been using Atom for a few months, and it’s about time to hack on it. Problem: I’m not primarily a web/UI guy, so even though I know basic CSS and JS, most of the way I write code is data stuff in Python.
What I’d really like to do is write a very simple package that takes either highlighted text or the entire buffer, pipes it directly as a string to an external script, which does its work and then sends a string back (standard streams are our friends?) to atom, to replace highlighted text/entire buffer.
So I look at the official docs for package creation, and the wordcount walkthrough, and it’s all like “here’s all this DOM manipulation you need to do,” and “here’s how you get menu items,” and “here’s what needs to be in your view class” and I’m like “but I don’t want to do DOM manipulation or create a view or anything else, I just wanna pass a string to a script.”
And buried in there I can see the methods I want — it looks like
atom.workspace.getActiveTextEditor().getText() will give me the entire buffer, but can I get at that and pipe it somewhere without messing around with all the UI/DOM stuff?
I’d appreciate any tips anyone has! Thanks!