Metadata-Version: 2.2
Name: video-curator
Version: 1.0.2
Summary: Your own youtube assistant
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: google-api-python-client>=2.158.0
Requires-Dist: openai-whisper>=20240930
Requires-Dist: torch>=2.5.1
Requires-Dist: yt-dlp>=2024.12.23
Requires-Dist: openai>=1.0.0
Requires-Dist: pytest>=8.3.4
Requires-Dist: litellm>=1.58.2
Requires-Dist: webvtt-py>=0.5.1
Requires-Dist: sqlalchemy>=2.0.37
Requires-Dist: markdown>=3.7
Requires-Dist: ffmpeg-python>=0.2.0
Requires-Dist: fastapi>=0.115.8
Requires-Dist: uvicorn>=0.34.0
Requires-Dist: schedule>=1.2.2
Requires-Dist: aiosmtplib>=4.0.0
Requires-Dist: flask>=3.1.0
Requires-Dist: flask-cors>=5.0.1

# YouTube Channel Monitor (Pre-release)

This tool monitors selected YouTube channels and generates summary reports of the latest videos. The key benefit is helping you decide whether to watch videos by reading AI-generated summaries first, saving you valuable time.

While there are similar products available (often paid), this solution offers unique values:
- It provides a daily report of concise summaries of channels' latest update that can replace watching entire videos in many cases. 
- It can get transcript for videos that does not have a subtitle, e.g. videos in Chinese. If you want to read the summary of a video in Chinese, this is the app you are looking for.

The application includes a web-based user interface. Email notification functionality is currently under development. For now, videos of interest must be manually added to the database.


## Installation

1. Clone this repository:
```bash
git clone https://github.com/zleung9/youtube-transcribe.git
cd youtube-transcribe
```

2. Activate a Python environment using conda or venv:

   **Using conda:**
   ```bash
   conda create -n youtube-transcribe python=3.10
   conda activate youtube-transcribe
   ```

   **Using venv:**
   ```bash
   python -m venv .venv
   # On Windows
   .venv\Scripts\activate
   # On macOS/Linux
   source .venv/bin/activate
   ```


3. Install the required packages. 
```bash
pip install -e . -r requirements.txt
```

4. Set up configuration:
```bash
cp config.json.template config.json
```

Edit `config.json` with your settings:
```json
{
    "model": [
        {
            "title": "openai-gpt-4o",
            "provider": "openai",
            "name": "gpt-4o",
            "api_key": "YOUR_OPENAI_API_KEY"
        },
        {   
            "title": "anthropic-claude-3.5-sonnet",
            "provider": "anthropic",
            "name": "claude-3-5-sonnet-20240620",
            "api_key": "YOUR_ANTHROPIC_API_KEY"
        }
    ],
    "summarizer": {
        "model_title": "anthropic-claude-3.5-sonnet", # by default
        "max_tokens": 4096,
        "temperature": 0.8
    },
}
```

The configuration file supports multiple AI models for summarization, YouTube channel monitoring with customizable check intervals, and email notification settings. You'll need to provide your own API keys for the services you plan to use.

## Usage

Run the main script. The command is `yourtube` with an "r". 
```bash
yourtube
```

This will open a web app in your default browser. For each video the app will fetch subtitles, summarize the content and store it in a sql database. 

Most of the time, videos spoken in Chinese doesn't have a subtitle. The app will download the video and transcribe using Whisper to get the subtitles. The downloaded video is then deleted upon the completion of transcription.


Here is a simple demo: 
[![Demo Video](https://img.youtube.com/vi/wu59USebe3g/maxresdefault.jpg)](https://youtu.be/wu59USebe3g)
