Package: ytcc
ytccCommand line tool to keep track of your favorite playlists on YouTube and many other places.InstallationpipinstallytccAlternative installation methods are described in thedocumentation.UsageAdd "subscriptions".# Any playlist supported by yt-dlp (or youtube-dl)ytccsubscribe"Jupiter Broadcasting""https://www.youtube.com/c/JupiterBroadcasting/videos"ytccsubscribe"NCS: House""https://www.youtube.com/playlist?list=PLRBp0Fe2GpgmsW46rJyudVFlY6IYjFBIK"ytccsubscribe"Neus""https://soundcloud.com/neus/tracks"# RSS feed podcastsytccsubscribe"LINUX Unplugged""https://linuxunplugged.com/rss"ytccsubscribe"Darknet Diaries""https://feeds.megaphone.fm/darknetdiaries"Import subscriptions fromGoogle Takeout.Hint: When requesting a takeout make sure to select only the YouTube data, otherwise the takeout might take quite long to complete.ytccimport~/Downloads/Takeout/Youtube/subscriptions/subscriptions.csvFetch metadata of new videos.ytccupdateList unwatched videos.ytcclistList playlist content in JSON format.ytcc--outputjsonlist--playlist"NCS: House"--since2020-07-07--watched--unwatchedList all videos as RSS feed.ytcc--outputrsslist--watched--unwatchedStart the interactive terminal interface.ytcctuiMark all videos of a playlist as watched without playing them.ytccls-p"Jupiter Broadcasting"|ytccmarkListen to some music without limitations.ytccls-p"NCS: House"|ytccplay--audio-onlyAlternative terminal interface with thumbnail support.Requiresfzfversion 0.23.1 or newer, optionallycurland eitherueberzugorkitty.
The script is automatically installed on most platforms during installation of ytcc.
If it's not installed, you can download it fromhere.ytccf.sh# Show help and key bindingsytccf.sh--helpConfigurationYtcc searches for a configuration file at following locations:The file given with-cor--configoptions~/.ytcc.conf$XDG_CONFIG_HOME/ytcc/ytcc.confor~/.config/ytcc/ytcc.conf/etc/ytcc/ytcc.confIf no config file is found in these locations, a default config file is created at$XDG_CONFIG_HOME/ytcc/ytcc.confor~/.config/ytcc/ytcc.confExample config[ytcc]# Directory where downloads are saved, when --path is not givendownload_dir=~/Downloads# Downloads videos to subdirectories by playlist name. If a video is on multiple playlists, ytcc# will download the video only to one subdirectory and symlink it to the other subdirectories.download_subdirs=on# Parameters passed to mpv. Adjusting these might break video playback in ytcc!mpv_flags=--ytdl --ytdl-format=bestvideo[height<=?1080]+bestaudio/best# Defines the order of video listings.# Possible options: id, url, title, description, publish_date, watched, duration, extractor_hash,# playlists. Every option must be suffixed with :desc or :asc for descending or ascending sort.order_by=playlists:asc, publish_date:desc# Default attributes shown in video listings.# Some ytcc commands allow overriding the default set here in the config.video_attrs=id, title, publish_date, duration, playlists# Default attributes shown in playlist/subscription listings.# Some ytcc commands allow overriding the default set here in the config.playlist_attrs=name, url, reverse, tags# Path where the database is stored.# Can be used to sync the database between multiple machines.db_path=~/.local/share/ytcc/ytcc.db# The format of used to print datesdate_format=%Y-%m-%d# Default failure threshold before a video is ignored.# When a video could not be updated repeatedly, it will be ignored by ytcc after `max_update_fail`# attempts. This setting can be overridden with the --max-fail commandline parameter.max_update_fail=5# Default update backlog.# The update command will only check the first `max_update_backlog` videos of a playlist to improve# performance. This setting can be overridden with the --max-backlog commandline parameter.max_update_backlog=20# Ignore videos that have an age limit higher than the one specified here.age_limit=0# Prompt and table colors. Supports 256 colors. Hence, values between 0-255 are allowed.# See https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit for the color codes.[theme]prompt_download_audio=2prompt_download_video=4prompt_play_audio=2prompt_play_video=4prompt_mark_watched=1table_alternate_background=245plain_label_text=244[tui]# The characters to use for selecting videos in interactive mode.alphabet=sdfervghnuiojkl# Default action of interactive mode.# Possible options: play_video, play_audio, mark_watched, download_audio, download_videodefault_action=play_video[youtube_dl]# Format (see FORMAT SELECTION in yt-dlp manpage). Make sure to use a video format here, if you# want to be able to download videos.format=bestvideo[height<=?1080]+bestaudio/best# Output template (see OUTPUT TEMPLATE in yt-dlp manpage).# Note that the output template will be prefixed with the `download_dir` directory and the name of# the playlist if `download_sub_dir` is enabled.output_template=%(title)s.%(ext)s# If a merge is required according to format selection, merge to the given container format.# One of mkv, mp4, ogg, webm, flvmerge_output_format=mkv# Limit download speed to the given bytes/second. Set 0 for no limit.# E.g. limit to one megabyte per second#ratelimit = 1000000ratelimit=0# Set number of retries before giving up on a download.# Set 0 for no retries.retries=0# Subtitles for videos.# If enabled and available, automatic and manual subtitles for selected languages are embedded in# the video.#subtitles = en,desubtitles=off# Embed the youtube thumbnail in audio downloads.# Transforms the resulting file to m4a, if enabled.thumbnail=on# Skips livestreams in download command.skip_live_stream=true# Don't download videos longer than 'max_duration' seconds.# 0 disables the limit.max_duration=9000# Restrict filenames to only ASCII characters and avoid "&" and spaces in filenames.restrict_filenames=offmpv configurationYtcc usesmpvto play videos.
You can configure mpv to integrate nicely with ytcc.
Specifics are documentedhere.Reporting issuesCreate a new issue on theGitHub issue tracker.
Describe the issue as detailed as possible and please use the issue templates, if possible!Important: do not forget to include the output ofytcc bug-reportin bug reports.
It also might help a lot to run ytcc with the--loglevel debugoption and include the output in your report.DevelopmentWe recommend developing inside a virtualenv.Set up avirtualenvInstall development dependencies:pip install -r devrequirements.txtRun the following commands before every pull request and fix the warnings or errors they produce.mypyytcc
pytest
pylintytcc
pydocstyleytcc