REQUEST: jq is great for json - but is there a "jq for xml"? Some webservices are still only available in xml (e.g. uv levels). I currently use XMLStarlet for xml in the terminal. There are extra annoyances in xml that you can't avoid (like namespaces), but it could be a lot closer to jq.
Ask HN: What are your favorite terminal programs?
181–190 of 203 posts
Re: Ask HN: What are your favorite terminal programs?
#182Re: Ask HN: What are your favorite terminal programs?
#183Earlier quoted context omitted.
One thing that I think most people don't consider often is that making things more usable isn't always good. Medium and message are interlinked. If everyone in the world switched to mobile, it would change the content of the articles we read and it would change the discussion of those articles. When you make something more usable on a different platform, you're encouraging the biases that the platform compels. In the…
You can have different rendering for mobile/non-mobile. We are in the midst of everyone switching to mobile.
Re: Ask HN: What are your favorite terminal programs?
#184Earlier quoted context omitted.
I use a shell script for such config. eg tmux split-window -h ; tmux send-keys "ls -la" C-m; ...
As I mentioned earlier, it is possible to do such things within the .tmux.conf, but not practical. Here's one of my real tmuxp configs: # How to use this file: # tmuxp load /path/to/this/file/main.yaml # - Specifying the .yaml extension is optional # - Specifying the path is optional if file is in ~/.tmuxp # # tmuxp --help for full help. session_name: main suppress_history: false start_directory: '~' shell_command_be…
Re: Ask HN: What are your favorite terminal programs?
#185Earlier quoted context omitted.
As I mentioned earlier, it is possible to do such things within the .tmux.conf, but not practical. Here's one of my real tmuxp configs: # How to use this file: # tmuxp load /path/to/this/file/main.yaml # - Specifying the .yaml extension is optional # - Specifying the path is optional if file is in ~/.tmuxp # # tmuxp --help for full help. session_name: main suppress_history: false start_directory: '~' shell_command_be…
I don't do it within the .tmux.conf - I use separate scripts, one per project.
Re: Ask HN: What are your favorite terminal programs?
#186Earlier quoted context omitted.
> you shouldn't really need a dedicate script to do that It isn't because the terminal is mis-configured and/or mis-interpreting those characters, it's because these characters have historically been used in a special way by troff's ascii output driver, as used by the man command. Bold characters are "emulated" by outputting the character itself, followed by ^H, then by repeating the character, and underline is emula…
You described the issue and cause better than I did :) I didn't know about the ANSI behavior, interesting. >FWIW, if you need a fool-proof way to convert a man page to plain old ASCII with no escapes at all, it's easiest just to redirect the output of "man" to a file: > man ls > ls.txt IIRC, even with that way, the control chars still appeared in the file (at least on some Unix version), which is why I wrote the scri…
That's a good point. My whole reply is a bit GNU-centric: the "col -bx" solution should work with everything except groff in ANSI mode (looks like the flag to go back to the standard troff behaviour is GROFF_NO_SGR [1][2], in case anybody is interested).
[1] See: https://linux.die.net/man/1/grotty [2] SGR is "Select Graphics Rendition", apparently: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_G...
Re: Ask HN: What are your favorite terminal programs?
#187Earlier quoted context omitted.
You can have different rendering for mobile/non-mobile. We are in the midst of everyone switching to mobile.
I know. I'm pointing out why this is a bad thing, because most people who advocate for better mobile support on Hacker News don't see themselves as advocating for a reduction in the quality of discussion and a reduction in the depth and complexity of the articles being shared.
Re: Ask HN: What are your favorite terminal programs?
#188MPS-Youtube is extremely useful if you don't mind the CLI and want to quickly play a YouTube video. translate-shell if you're a language person. Very complete interface to most popular translation services. atools(aunpack, apack, als, etc) for quick archive manipulation if you're lazy.
mpv + youtube-dl plugin are also a nice combination, especially for live streams.
Re: Ask HN: What are your favorite terminal programs?
#189REQUEST: jq is great for json - but is there a "jq for xml"? Some webservices are still only available in xml (e.g. uv levels). I currently use XMLStarlet for xml in the terminal. There are extra annoyances in xml that you can't avoid (like namespaces), but it could be a lot closer to jq.
I’ve used https://github.com/ericchiang/xpup for this a few times.
pup (https://github.com/ericchiang/pup/blob/master/README.md) which apparently inspired xpup does seem to have this, e.g. chaining, but unfortunately it uses css selectors instead of xpath.
Re: Ask HN: What are your favorite terminal programs?
#190pdftk. If you find yourself needing to extract pages, split or merge pdf documents, this is wonderful.