Restore correct Update Manager README

This commit is contained in:
Eddie Nielsen 2026-03-25 15:51:54 +00:00
parent 0281c9d13c
commit 3a5535f945

253
README.md
View file

@ -1,152 +1,227 @@
<p align="center"> <p align="center">
<img src="images/subfox-logo.png" width="600"> <img src="images/updatemanager-logo.png" width="600">
</p> </p>
# SubFox 🦊
> 🎬 Intelligent subtitle translation with disk cache & batching Simple CLI tool to check and manage updates across multiple Ubuntu systems over SSH.
SubFox translates subtitle files efficiently using batching and a persistent disk cache — reducing API calls and improving performance. Built for Lanx environments lightweight, fast and no unnecessary dependencies.
--- ---
## 🚀 Version ## 📚 Table of Contents
**Current version: 0.1.0** * [Features](#features)
* [Update Manager UI](#update-manager-ui)
* [Quick Install](#quick-install)
* [SSH Setup](#ssh-setup-required)
* [Configuration](#configuration)
* [Usage](#usage)
* [Logging](#logging)
* [File Structure](#file-structure)
* [How it works](#how-it-works)
* [Requirements](#requirements)
* [Future ideas](#future-ideas)
* [License](#license)
--- ---
## ⚡ Features ## Features
* 🔁 Batch translation (packed subtitles) * Check updates on multiple hosts
* 💾 Disk cache (persistent across restarts) * Run updates remotely over SSH
* ⚡ Reduced API usage via caching * Interactive CLI menu (dialog-based UI)
* 🧠 Smart fallback per subtitle line * Centralized logging
* 🐳 Docker-based deployment * Simple config files
* 📡 API-driven translation flow * No agents required
* 📊 Progress tracking support * Works with existing SSH setup
--- ---
## ⚡ Quick Start ## Update Manager UI
### 1. Clone project ### Main menu
<p align="center">
<img src="docs/images/menu-main.png" width="50%" alt="Main menu">
</p>
### Log menu
<p align="center">
<img src="docs/images/menu-logs.png" width="50%" alt="Log menu">
</p>
<p align="center">
<em>Lightweight • No dependencies • Works over SSH</em>
</p>
---
## Quick Install
```bash ```bash
git clone https://git.lanx.dk/ed/subfox.git git clone https://github.com/YOUR-USER/update-manager.git
cd subfox cd update-manager
sudo apt update
sudo apt install dialog openssh-client
sudo mkdir -p /opt/update-manager
sudo cp update-manager.sh update-manager-ui.sh dialogrc /opt/update-manager/
sudo chmod +x /opt/update-manager/update-manager.sh
sudo chmod +x /opt/update-manager/update-manager-ui.sh
sudo ln -s /opt/update-manager/update-manager.sh /usr/local/bin/update-manager
sudo ln -s /opt/update-manager/update-manager-ui.sh /usr/local/bin/update-manager-ui
``` ```
--- ---
### 2. Setup environment ## SSH Setup (Required)
Create `.env`: Update Manager uses SSH to connect to your hosts.
```env You must have SSH key-based authentication set up (no password prompts).
OPENAI_API_KEY=your_api_key_here
```
--- ### Generate SSH key (if not already done)
### 3. Start with Docker
```bash ```bash
docker compose up -d --build ssh-keygen -t ed25519
``` ```
--- ---
### 4. Open in browser ### Copy key to hosts
``` ```bash
http://localhost:8000 ssh-copy-id user@192.168.1.10
ssh-copy-id user@192.168.1.20
ssh-copy-id user@192.168.1.30
``` ```
--- ---
## 🧠 How it Works ### Test connection
```text ```bash
Upload SRT ssh user@192.168.1.10
```
Parse blocks
You should be able to connect **without entering a password**.
Batch translation (packed)
> ⚠️ If SSH is not configured, the tool will fail or hang during execution.
Cache lookup
---
OpenAI (if needed)
## Configuration
Fallback per-line (if mismatch)
### Copy config files
Return translated subtitles
```bash
cp update-manager.conf.example update-manager.conf
cp hosts.conf.example hosts.conf
``` ```
--- ---
## 💾 Cache System ### Edit hosts
SubFox uses a disk-based cache: ```bash
nano hosts.conf
* Stored in `/data/cache` ```
* Persisted via Docker volume
* One file per translation (hashed key)
Example: Example:
```text ```bash
/data/cache/en_da/ # name ip user
├── a1b2c3d4.json server1 192.168.1.10 user
├── f6g7h8i9.json server2 192.168.1.20 user
server3 192.168.1.30 user
``` ```
--- ---
## 🐳 Docker Configuration ## Usage
Example volume setup: ### Check updates
```yaml
volumes:
- ./uploads:/app/uploads
- ./outputs:/app/outputs
- /mnt/user/appdata/subfox/cache:/data/cache
```
---
## 📡 API
### Version endpoint
```bash ```bash
GET /version update-manager check
``` ```
Response: ### Start UI
```json ```bash
{ update-manager-ui
"version": "0.1.0"
}
``` ```
--- ---
## 📜 Changelog ## Logging
See [CHANGELOG.md](CHANGELOG.md) Log file location:
```bash
/opt/update-manager/log/update-manager.log
```
View log:
```bash
less /opt/update-manager/log/update-manager.log
```
Follow log:
```bash
tail -f /opt/update-manager/log/update-manager.log
```
--- ---
## 🛠 Tech Stack ## File Structure
* Python 3.11 ```bash
* FastAPI /opt/update-manager/
* OpenAI API ├── update-manager.sh
* Docker ├── update-manager-ui.sh
* JSON-based disk cache ├── update-manager.conf
├── hosts.conf
├── log/
│ └── update-manager.log
```
---
## How it works
* Uses SSH to connect to each host
* Runs `apt` commands remotely
* Logs results locally
* No agents or services needed
* Designed for simple and efficient operations
---
## Requirements
* SSH access to all hosts
* SSH keys recommended (no password prompts)
* Ubuntu/Debian-based systems
---
## Future ideas
* 🔔 Notifications (ntfy / push alerts)
* 🌐 Web interface
* 📧 Email reporting
* 📊 Basic monitoring (status, last check, pending updates)
* 🧩 Plugin system (extensible modules)
* 🔐 Security & compliance checks
* 🤖 AI integration (Lanx AI)
--- ---
@ -156,3 +231,13 @@ Built with ❤️ for Lanx by [NodeFox 🦊](https://nodefox.lanx.dk)
Maintained by [Eddie Nielsen](https://lanx.dk) Maintained by [Eddie Nielsen](https://lanx.dk)
> Learn. Adopt. Survive. Share. > Learn. Adopt. Survive. Share.
---
## License
This project is licensed under the GNU GPL v3 License.
See the LICENSE file for full details.
---