Skip to content
/ PyTwitch Public

A user-friendly tool for easily accessing and watching live streams, videos, and clips from Twitch.

License

Notifications You must be signed in to change notification settings

haaag/PyTwitch

Repository files navigation

Python Hatch project linting - Ruff types - Mypy License - MIT

Twitch Menu

⭐ About

A user-friendly tool for accessing and watching live streams, videos, and clips from Twitch.

📼 Video

pytwitch.mp4

⚡️ Requirements

🔒Credentials

For authentication, you can set environment vars in your shell and export them or use the .env file and put it in the root of the project.

env-template file

# Twitch credentials
TWITCH_CLIENT_ID="xxxxx"
TWITCH_ACCESS_TOKEN="xxx"
TWITCH_USER_ID="123456"

🔓Credentials directions

📦 Installation

# Clone repository
$ git clone "https://github.com/haaag/pytwitch.git"
$ cd pytwitch

# Create virtual environment & source
$ python -m venv .venv
$ source .venv/bin/activate

# Install requirements
(.venv) $ pip install -r requirements.txt

# Install
(.venv) $ pip install .

🛠️ Usage

After installation you can use the command pytwitch

Or use a alias like alias pt='pytwitch -e ~/path/to/envfile/.env'

$ pytwtich -h
Simple tool menu for watching streams, videos from twitch.

arguments:
    -m, --menu          select menu [rofi|dmenu] (default: rofi)
    -e, --env           path to env file
    -C, --channel       search by channel query
    -G, --games         search by game or category
    -v, --verbose       increase verbosity (use -v, -vv, or -vvv)
    -h, --help          show this help

options:
    --no-markup         disable pango markup (rofi)
    --no-conf           disable `mpv` configuration

⌨️ Keybinds Rofi only

Keybind Usage
alt-k list keybinds
alt-s search by category or game
alt-c search by channel
alt-v list channel's videos
alt-t group by category or game
alt-o open stream chat in browser
alt-i show item information
alt-m show top streams
alt-g show top games with streams
alt-m multi-select streams

🔗 References

➕ Dependencies

🧰 TODO

  • Finish tests
  • Create/Update requirements/dependencies
  • Complete Usage
  • Update screenshots
  • Better logging
  • Update GIFs
  • Update argparse help
  • Display keybinds

Releases

No releases published

Packages

No packages published

Languages