I don't want to open up Terminal, remember some (Python) code to JSON format some string that I've just copy/pasted and hope that I've remembered it correctly and it works.
Oh! But I don't remember the code! So I have to look it up, probably on StackOverflow b/c I'm lazy (not really, I just want to format the text I've just copied to clipboard not remember the correct lib that python uses for formatting), but how do I do that? I've already copied the text I want to format to clipboard and if I copy the code to format the code that I have in my clipboard to the clipboard it will erase the text that I want to format! xD
So, yeah, little Util GUI Apps like these are useful.
In Python 2.7, encoding to Base64 in a pipe used to be a mouthful:
echo "foo" | python2.7 -c 'import sys; print sys.stdin.read().encode("base64")'
Now it's even worse: echo "foo" | python3 -c 'import base64,sys; print(base64.b64encode(sys.stdin.buffer.read()).decode("ascii"))'
As an aside, the base64 module is a good example of how rough the Python standard library is, and it seems like no one is being a gatekeeper of new changes. Almost no one wants base64.decode, but base64.b64decode. Or maybe base64.standard_b64encode? Or base64.encodebytes? Not to mention the majority of functions in the module are _not_ related to Base64 but other encodings.Don’t take this wrong way, I’m trying to phrase this as nice as I can, because I’m truly super curious where people who ask these questions are coming from, but isn’t that obvious? Are you not aware how much more memorization, typing, and room for error your solutions have? Or do you just not value those difference? And if it’s the last one, why isn’t it obvious that this is simply for people who do value those differences more? (Again, sorry if this sounds rude, but I see comments like this a lot, and I want to understand the psychology behind them.)
You create a bin script or an alias the first time you do it. i.e. typing `escape-html "<h1>hello</h1>"` in your terminal is infinitely more efficient and easier than firing up some app and navigating some menus. This also supports of all of unix actions like piping and output redirection.
I honestly quite shocked how many developers on MacOs are not familiar with the terminal and are weirdly afraid of it!
Also... sending HTML as a parameter in your shell? Have you actually tried this? That's going to be a nightmare to escape for anything even a little bit complicated.
[1]: https://github.com/robenkleene/Dotfiles/blob/master/zsh/alia...
[2]: https://github.com/robenkleene/Dotfiles/blob/master/zsh/abbr...
This looks great. As another commenter mentioned, even if you are the above things, not having to remember pieces of obscure domain knowledge to complete tasks is useful (say, you're not a Python or JS dev).
Why write a line of Python when I can Ctrl+C/Ctrl+V (especially if the task originates from outside of the terminal)?
Seems like a lot of these can be replaced by a line of python (or javascript or gnu util).
- backslash escapes: `print(text)`
- b64 decode: `base64.b64decode('text')`
- html escape: `html.escape('<h1>hello</h1>')`
...
And you have that in terminal for piping, output redirection and all of that unix goodness. GUI for this seems like a very peculiar option here, especially when it integrates with the rest of the environment only through clipboard.
Other than that big fan of the business model though you don't have a license specified in your github repo.