yt/README

71 lines
1.7 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

yt(1) is a helper script providing functions for use with mpv and yt-dlp for
viewing and interacting with YouTube videos.
Dependencies:
- curl(1)
- jq(1)
- yt-dlp(1)
Environment Variables:
$DEBUG
- Set this variable to get debug output to stderr
$PLAYER
- Set this variable to a video player that can utilize yt-dlp to playback
videos from YouTube
$YTPICK
- Set this variable to a dmenu-compatible picker for use with the pick
subcommand
$YT_PL_DIR
- Set this variable to the directory where playlists should be stored; defaults
to $XDG_DATA_HOME/yt
Usage:
yt add | archive | cache | clone | list | localsearch | new | pick | play | queue | search | sync | verify
add uri playlist
- Adds a video by URI to a playlist
archive uri...
- Archives videos on the Wayback Machine
cache video...
- Caches video titles
clone uri [playlist]
- Clones a YouTube playlist to a file
list
- lists local playlists
localsearch
- uses $YTPICK to search for videos from the local cache
new playlist...
- creates new playlists
pick playlist...
- Opens $PICKER to a list of videos in a file
play uri...
- Plays videos, caching their titles first
queue playlist...
- Queues playlists
search term [count]
- Searches YouTube for term and returns count results
sync [playlist]
- If a playlist is specified, sync that playlist with its remote YouTube
counterpart; otherwise, sync all playlists with remotes
verify playlist...
- Verifies that all the videos in a playlist are existent on YouTube, and if
they arent, attempts to replace the URI with one from the Wayback Machine. If
the video isnt available on the Wayback Machine, it comments the video link. It
then caches the title of the video.