Git Product home page Git Product logo

ytcc's Introduction

ytcc - The YouTube channel checker

Command Line tool to keep track of your favourite YouTube channels without signing up for a Google account.

Installation

Arch Linux

Install ytcc from the AUR.

Void Linux

Install package ytcc.

Other distros

Ytcc requires python 3.6 or later. Install dependencies: python3-lxml, python3-feedparser, python3-setuptools, mpv, youtube-dl.

git clone https://github.com/woefe/ytcc.git
cd ytcc
sudo python3 setup.py install
sudo install -Dm644 zsh/_ytcc /usr/share/zsh/site-functions/_ytcc

Usage

Check for new videos and play them.

ytcc

Check for new videos and play them without asking you anything.

ytcc -y

"Subscribe" to a channel.

ytcc -a "Jupiter Broadcasting" https://www.youtube.com/user/jupiterbroadcasting

Import subscriptions from YouTube's subscription manager export.

ytcc --import-from ~/Downloads/subscription_manager

Check for new videos, print a list of new videos and play them.

ytcc -ulw

Download all videos from a channel that were published in July.

ytcc -f "Jupiter Broadcasting" --download --since 07-01 --to 07-31 --include-watched

Download only the audio track of "LINUX Unplugged" episodes

ytcc --search "channel:jupiter title:unplugged" --download --no-video

Note that the --search option only searches ytcc's database and not youtube.com.

Mark all videos of a channel as watched.

ytcc -f "Jupiter Broadcasting" -m

Search for Playthroughs, Let's Plays, ...

ytcc --search "title:*play*" -l

Listen to some music without limitations.

ytcc --add "NCS" https://www.youtube.com/user/NoCopyrightSounds --update
ytcc --disable-interactive --list --watch --no-video --include-watched --channel-filter NCS

Configuration

Ytcc searches for a configuration file at following locations:

  1. $XDG_CONFIG_HOME/ytcc/ytcc.conf
  2. ~/.config/ytcc/ytcc.conf
  3. ~/.ytcc.conf

If no config file is found in these three locations, a default config file is created at ~/.config/ytcc/ytcc.conf.

Example config

# General options
[YTCC]
# Path to file where database is stored. Can be used to sync the database between multiple machines ;)
dbpath = ~/.local/share/ytcc/ytcc.db

# Directory where downloads are saved, when --path is not given
downloaddir = ~/Downloads

# Parameters passed to mpv. Adjusting these might break ytcc!
mpvflags = --really-quiet --ytdl --ytdl-format=bestvideo[height<=?1080]+bestaudio/best


# Alternative interactive mode. Select videos with short tags instead of playing them in a pre-defined
# order
[quickselect]
# Enables or disables quickselect mode.
enabled = yes

# Plays the selected video instantly, if disabled. Otherwise it shows the interactive prompt
ask = yes

# The character to use for the quickselect tags.
alphabet = sdfervghnuiojkl


# Options for downloads
[youtube-dl]
# Format (see FORMAT SELECTION in youtube-dl 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 youtube-dl manpage)
outputtemplate = %(title)s.%(ext)s

# Loglevel options: quiet, normal, verbose
loglevel = normal

# Limit download speed to the given bytes/second. Set 0 for no limit.
# E.g. limit to one megabyte per second
#ratelimit = 1000000
ratelimit = 0

# Set number of retries before giving up on a download. Use `inf` for indefinitely many retries.
retries = 0

# Subtitles for videos. If enabled and available, automatic and manual subtitles for selected
# languages are embedded in the video.
#subtitles = en,de
subtitles = off

# Embed the youtube thumbnail in audio downloads. Transforms the resulting file to m4a, if
# enabled.
thumbnail = on


# Columns printed by --list option, if --columns is not given as well.
[TableFormat]
id = on
date = off
channel = on
title = on
url = off
watched = off

Reporting issues

Create a new issue on the github issue tracker. Describe the issue as detailed as possible. Important: do not forget to include the output of ytcc --bug-report-info in bug reports.

Translations

Ytcc uses the GNU gettext utilities to manage localization.

Managing locales

Create a new locale with msginit. The example below creates a new locale for Polish.

cd po
msginit --locale pl

Every time the PO template is changed, the locales have to be updated with msgmerge.

cd po
msgmerge --update de.po ytcc.pot

Every time a PO file is created or updated, new strings have to be translated. There are multiple tools available, see the GNU gettext manual. I prefer GTranslator, e.g:

cd po
gtranslator de.po

Updating the PO tempate

xgettext --output=po/ytcc.pot \
    --language=Python \
    --from-code=utf-8 \
    --copyright-holder="Wolfgang Popp" \
    --package-name="ytcc" \
    --package-version=$(python -c "import ytcc; print(ytcc.__version__)") \
    ytcc/{cli,arguments}.py

ytcc's People

Contributors

woefe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.