Show HN: Interactively select the quality and format for youtube-dl
11–20 of 95 posts
Re: Show HN: Interactively select the quality and format for youtube-dl
#12* Familiar syntax and semantics (Bash/Zsh/Fish/Csh/Ksh/Ash/Wtfsh are all way weirder than JS - and they are _only_ scripting languages, while JS is already everywhere)
* Standard library (https://nodejs.org/dist/latest-v12.x/docs/api/fs.html) gives you access to POSIX APIs ("batteries included" - but not bloated)
* Sane packaging, package management, and ecosystem (overreliance on third-party module is a thing exactly because NPM works with much less friction than e.g. the Python situation)
* Asynchronous event model lets you safely do multiple things in parallel without worrying about low-level memory management, or which concurrency boilerplate library to use, etc.
All in all, it's the perfect Unix glue. All it misses is a mature S-expression-based syntax.
For example, take the problem of locking your encrypted partitions before suspending your Linux machine. Since distro developers are too "busy" to provide what one might say is basic functionality, power users took matters in their own hands and wrote this 100-ish line Bash script (https://github.com/vianney/arch-luks-suspend), which evolved into this 1500-ish line Go monstrosity (https://github.com/guns/go-luks-suspend)... as well as these ~75 lines of Node.js (https://github.com/egasimus/node-luks-suspend).
But yeah, sure, hurr durr JaavaaScriipt baad, 0.1+0.2!==0.3, 'true'==true, etc... The horror!
Re: Show HN: Interactively select the quality and format for youtube-dl
#13PS: I coded this in an evening. This proves for me that nodejs makes it so easy to make beautiful CLI apps. It is simple and makes may life easier. See more node cli tools at: https://github.com/sindresorhus/awesome-nodejs#command-line-...
Re: Show HN: Interactively select the quality and format for youtube-dl
#14Re: Show HN: Interactively select the quality and format for youtube-dl
#15PS: I coded this in an evening. This proves for me that nodejs makes it so easy to make beautiful CLI apps. It is simple and makes may life easier. See more node cli tools at: https://github.com/sindresorhus/awesome-nodejs#command-line-...
Thanks for making this. I'd say that Node does not make good CLI apps though. It means I have to install it on my machine in order to use your program. The best CLI apps are made with compiled languages so you can distributed them without a runtime, third party libs...
Re: Show HN: Interactively select the quality and format for youtube-dl
#16Remembering flags is hard? Are shell scripts no longer a thing?
So I understand the sentiment.
Re: Show HN: Interactively select the quality and format for youtube-dl
#17Remembering flags is hard? Are shell scripts no longer a thing?
As for shell scripts, they are a thing, and this thing is one (just written in node rather than bash.)
Re: Show HN: Interactively select the quality and format for youtube-dl
#18This is too trivial to share, IMO. Anyway, shell is more suitable for this kind of programs: you could write a bash script that ties together youtube-dl and dmenu or fzf or whatever within an hour.
How do you define complexity threshold for something being worth sharing?
More to the point, why do you define that threshold? What benefit is there to saying someone's work that they're sharing has to be sufficiently complicated? Simple things can be immensely useful and well worth sharing.
Re: Show HN: Interactively select the quality and format for youtube-dl
#19This is too trivial to share, IMO. Anyway, shell is more suitable for this kind of programs: you could write a bash script that ties together youtube-dl and dmenu or fzf or whatever within an hour.
On the contrary, I find that a lot of tools I'm happy to have are the trivials one.
Who have never used whoami for example ? It's two chained system calls, but I'm still glad it's baked in and I don't have to rewrite it everywhere I use it.
Re: Show HN: Interactively select the quality and format for youtube-dl
#20I just have an alias with the format codes I want in order of preference (youtube-dl allows that) That's a very nice interactive ui though