Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/acidghost/twitch-search
Search Twitch via terminal
https://github.com/acidghost/twitch-search
twitch twitch-cli twitch-client
Last synced: about 2 months ago
JSON representation
Search Twitch via terminal
- Host: GitHub
- URL: https://github.com/acidghost/twitch-search
- Owner: acidghost
- License: gpl-3.0
- Created: 2021-07-28T13:23:29.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-23T13:01:01.000Z (almost 3 years ago)
- Last Synced: 2024-06-21T07:33:04.777Z (6 months ago)
- Topics: twitch, twitch-cli, twitch-client
- Language: Go
- Homepage:
- Size: 813 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Twitch Search Utility
Lists live followed channels and lists VoDs.## Install
Usual Go tools: `go build .`, `go install .`.You will also need to register your application
[on twitch](https://dev.twitch.tv/docs/api#register-an-app) and insert
`http://localhost:9001/callback` as redirect URL. Once you have client ID and
secret, put them in `~/.twitch-search-client.json` as:```json
{
"id": "",
"secret": ""
}
```## Usage
Use the `-live` flag to list followed live channels.List VoDs of channel given by `-vod`.
## fzf Integration
The following snippets integrate `twitch-search` with
[fzf](https://github.com/junegunn/fzf). They can be used to have interactive
search and starting your video player on the video that you select.```bash
# List VoDs and start selection with streamlink
twitch_search_vods() {
twitch-search -vod="$1" \
| fzf --ansi --height=50% --layout=reverse \
| awk '{print $1}' \
| xargs -I{} -o bash -c 'mpv --terminal=no {} & echo {}'
}# List live channels and start streamlink and chatterino on the selection
twitch_search_live() {
twitch-search -live \
| fzf --ansi --height=50% --layout=reverse \
| awk '{print $1}' \
| xargs -I{} -o bash -c 'mpv --terminal=no https://twitch.tv/{} & echo {}'
}
```![screen-fzf](screen-fzf.png)