Compare commits
2 Commits
81a8e3a56b
...
v0.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 01469f9b77 | |||
| 0801a3413d |
12
README.md
12
README.md
@@ -16,15 +16,15 @@ This project aims to provide a customizable way to view YouTube Live Chat direct
|
||||
|
||||
## Setup Instructions
|
||||
|
||||
### 1. Clone the Repository (Future Step)
|
||||
Once this project is on GitHub, you would clone it using:
|
||||
### 1. Clone the Repository
|
||||
Clone the project from your Gitea instance:
|
||||
```bash
|
||||
git clone [repository-url]
|
||||
cd youtube_chat_terminal
|
||||
git clone https://gitea.ramforth.net/RamTech/youtube-chat-terminal.git
|
||||
cd youtube-chat-terminal
|
||||
```
|
||||
|
||||
### 2. Create and Activate a Python Virtual Environment
|
||||
It's highly recommended to use a virtual environment to manage project dependencies.
|
||||
### 2. Gitea Repository
|
||||
This project is hosted on your Gitea instance at: `https://gitea.ramforth.net/RamTech/youtube-chat-terminal`
|
||||
|
||||
```bash
|
||||
cd /home/joe/Cloud9/Documents/Obisdian/youtube_chat_terminal
|
||||
|
||||
10
main.py
10
main.py
@@ -87,17 +87,19 @@ def main():
|
||||
console.print("[red]Could not find an active live chat for the given video ID.[/red]")
|
||||
return
|
||||
|
||||
console.print(f"[green]Found live chat ID: {live_chat_id}[/green]")
|
||||
|
||||
# Setup chat logging
|
||||
log_dir = "chat_logs"
|
||||
os.makedirs(log_dir, exist_ok=True)
|
||||
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
|
||||
log_filename = os.path.join(log_dir, f"chat_{video_id}_{timestamp}.log")
|
||||
log_file = open(log_filename, "w", encoding="utf-8")
|
||||
console.print(f"[green]Chat will be logged to {log_filename}[/green]")
|
||||
|
||||
# Display initial messages using rich.Live for a few seconds
|
||||
with Live(console=console, screen=True, refresh_per_second=4) as live:
|
||||
live.update(Text(f"[green]Found live chat ID: {live_chat_id}[/green]\n[green]Chat will be logged to {log_filename}[/green]", justify="center"))
|
||||
time.sleep(5)
|
||||
# Wait for 5 seconds, then clear the screen again
|
||||
time.sleep(5)
|
||||
os.system('clear')
|
||||
|
||||
next_page_token = None
|
||||
message_count = 0
|
||||
|
||||
Reference in New Issue
Block a user