Generates a list of links to all public videos of a YouTube channel.
$ yt-chanvids PewDiePie
https://www.youtube.com/watch?v=0zYI8FjSF_k
https://www.youtube.com/watch?v=X4dAPKYPhDQ
https://www.youtube.com/watch?v=LZ0rGTsdfwk
[...]
This program is published on Crates.io so you can easily get it by running cargo install, like so:
cargo install yt-chanvids
All binaries installed with cargo install are stored in the installation root’s bin folder. If you installed Rust using rustup.rs and don’t have any custom configurations, this directory will be $HOME/.cargo/bin. Ensure that directory is in your $PATH to be able to run programs you’ve installed with cargo install.
yt-chanvids [OPTIONS] [--] CHANNEL-ID|USERNAME
You can pass either the username or the channel id of a YouTube channel (which can be spotted in the address of their page) and the program will print a line separated list of links to the standard output stream.
When the program faces an unexpected situation, it will write any diagnostic message to the standard error stream. It may terminate execution and when it does it will always return an error exit code.
At the moment there is only the help option (-h
, --help
) available which
makes the program do nothing but print usage instructions. The --
sequence
is useful to prevent any arguments after it to be interpreted as options.
The following examples assume bash as the shell. Long output is redacted with
[...]
.
Getting the links is as simple as passing a channel id or username to the program.
```
$ yt-chanvids UCR4s1DE9J4DHzZYXMltSMAg https://www.youtube.com/watch?v=yAmGdn9t5Rs https://www.youtube.com/watch?v=_w6-iHbtn-Y https://www.youtube.com/watch?v=K1x2Nox-f1A https://www.youtube.com/watch?v=gFm3brOdxcw https://www.youtube.com/watch?v=d63CSqjM44k [...] ```
```
$ yt-chanvids HowToBasic https://www.youtube.com/watch?v=yAmGdn9t5Rs https://www.youtube.com/watch?v=_w6-iHbtn-Y https://www.youtube.com/watch?v=K1x2Nox-f1A https://www.youtube.com/watch?v=gFm3brOdxcw https://www.youtube.com/watch?v=d63CSqjM44k [...] ```
If your shell supports redirection of output, you can probably do things like inserting content to files or sending it to the input stream of an other command. Having the links separated by new lines makes it easy for other commands to manipulate them.
```
$ yt-chanvids Vsauce > to-watch.txt
$ yt-chanvids Vsauce2 >> to-watch.txt ```
```
$ yt-chanvids PewDiePie | wc -l 2929 ```
```
$ yt-chanvids PewDiePie | sed "s/^https:\/\/www.youtube.com\/watch?v=/https:\/\/youtu.be\//" https://youtu.be/0zYI8FjSF_k https://youtu.be/X4dAPKYPhDQ https://youtu.be/LZ0rGTsdfwk [...] ```
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.