Metadata-Version: 2.4
Name: tts_webui_extension.log_viewer
Version: 0.2.0
Summary: View, search, and manage log files from the TTS Generation WebUI
Author: rsxdalv
License: MIT
Project-URL: Homepage, https://github.com/rsxdalv/tts-generation-webui
Project-URL: Repository, https://github.com/rsxdalv/tts_webui_extension.log_viewer
Project-URL: Issues, https://github.com/rsxdalv/tts_webui_extension.log_viewer/issues
Keywords: tts,gradio,log-viewer,extension
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: gradio>=4.0.0
Dynamic: license-file

# Log Viewer Extension

A log viewer extension for [TTS Generation WebUI](https://github.com/rsxdalv/tts-generation-webui) that allows you to view, search, and manage log files directly from the web interface.

## Description

This extension provides a convenient interface for viewing and managing log files generated by TTS Generation WebUI and its extensions. It's particularly useful for:

- Viewing installation logs for extensions
- Debugging issues by searching through logs
- Managing disk space by deleting old logs
- Quick access to recent logs without navigating the file system

## Features

### 📁 All Logs Tab
- 📋 **Browse Log Files**: View all log files sorted by modification date
- 🔍 **Search & Filter**: Filter log content by keywords
- 📊 **Log Statistics**: See total number of logs and disk space used
- 📄 **File Information**: View file size and last modified date
- 🗑️ **Log Management**: Delete individual logs or clear all at once
- 📋 **Copy to Clipboard**: Easy copy button for sharing log content
- 🔢 **Configurable Display**: Control how many lines to display

### 📦 Pip Install Logs Tab
- 📝 **Cleaned Names**: Display pip log names without prefixes/suffixes
- 📊 **Quick Summary**: See status overview of recent installations
- 🔍 **Intelligent Analysis**: Automatic detection of success/failure/errors
- ✅ **Success Indicators**: Shows successful installations and satisfied requirements
- ❌ **Error Detection**: Identifies and highlights errors and failures
- ⚠️ **Warning Detection**: Captures deprecation warnings and other issues
- 📈 **Statistics**: Line count, error count, warning count
- 📄 **Raw View**: Access original log content with search capability

### 🗑️ Pip Uninstall Logs Tab
- Same features as Pip Install Logs but for uninstallation operations
- Separate tracking for package removals
- Analysis of uninstallation success/failure

## Installation

### From TTS WebUI

The extension should be available in the Extensions tab of TTS Generation WebUI. Simply enable it from there.

### Manual Installation

```bash
pip install git+https://github.com/rsxdalv/tts_webui_extension.log_viewer@main
```

## Usage

### All Logs Tab
1. Install the extension
2. Restart TTS Generation WebUI
3. Navigate to the "Log Viewer" tab
4. Select a log file from the dropdown
5. Click "👁️ View" to display the log content
6. Use the search box to filter by keywords
7. Adjust "Max Lines" to control how much content is displayed

### Pip Install/Uninstall Logs Tabs
1. Navigate to the "📦 Pip Install Logs" or "🗑️ Pip Uninstall Logs" tab
2. View the summary of recent installations/uninstallations with status icons:
   - ✅ = Success
   - ❌ = Failed/Error
   - ❓ = Unknown/Unclear
3. Select a log from the dropdown
4. Click "🔍 Analyze Log" to see detailed analysis
5. Switch to "📄 Raw Log" tab to view the original log content

### Tips

- **Search**: Enter keywords to filter log entries (case-insensitive)
- **Max Lines**: Increase for longer logs, decrease for better performance
- **Refresh**: Click the refresh button to update the file list after new logs are created
- **Delete**: Use with caution! Deleted logs cannot be recovered
- **Analysis**: The analyzer shows unique errors and warnings, not every occurrence
- **Status Icons**: Quick visual feedback on installation success/failure in the summary

## Development

To run the extension standalone for development:

```bash
cd workspace/tts_webui_extension.log_viewer/tts_webui_extension/log_viewer
python main.py
```

The standalone version will launch at `http://localhost:7772`

## License

MIT License
