ytgo/README.md
2024-12-09 22:15:15 +00:00

71 lines
No EOL
1.5 KiB
Markdown

# YTGO
A terminal-based YouTube video browser and player written in Go. Search for videos directly from your terminal and play them using mpv.
## Features
- 🔍 Fast YouTube search with real-time results
- 📺 Video playback using mpv
- 👀 View video details (duration, views, upload date)
- 🖼️ ASCII art thumbnails in terminal
- ⌨️ Vim-style keyboard navigation
## Prerequisites
- Go 1.19 or higher
- mpv media player
- YouTube Data API key
## Installation
1. Clone the repository:
```bash
git clone https://git.k4li.de/pika/ytgo.git
cd ytgo
```
2. Install dependencies:
```bash
go mod tidy
```
3. Get a YouTube Data API key:
- Go to [Google Cloud Console](https://console.cloud.google.com/)
- Create a new project
- Enable the YouTube Data API v3
- Create credentials (API key)
- Replace `YOUR_API_KEY` in `scraper/scraper.go` with your API key
4. Build and install:
```bash
go build
```
5. Run the application:
```bash
./ytgo
```
6. Enjoy!
### Keyboard Controls
- `/` - Activate search bar
- `Enter` - Submit search or play selected video
- `↑/↓` - Navigate through results
- `Esc` - Exit search mode
- `q` - Quit application
## Dependencies
- [Bubble Tea](https://github.com/charmbracelet/bubbletea) - Terminal UI framework
- [YouTube Data API v3](https://developers.google.com/youtube/v3) - YouTube API
- [mpv](https://mpv.io/) - Video player
## License
MIT License
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.