Fixed header file

This commit is contained in:
Eddie Nielsen 2026-03-25 13:46:20 +00:00
parent 08eeb039b4
commit 0281c9d13c

246
README.md
View file

@ -1,244 +1,158 @@
<p align="center"> <p align="center">
<img src="images/updatemanager-logo.png" width="500"> <img src="images/subfox-logo.png" width="600">
</p> </p>
<p align="center"> # SubFox 🦊
Simple CLI tool to check and manage updates across multiple Ubuntu systems over SSH.
</p>
<p align="center"> > 🎬 Intelligent subtitle translation with disk cache & batching
Built for Lanx environments lightweight, fast and no unnecessary dependencies.
</p>
## 📚 Table of Contents SubFox translates subtitle files efficiently using batching and a persistent disk cache — reducing API calls and improving performance.
* [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 ## 🚀 Version
* Check updates on multiple hosts **Current version: 0.1.0**
* Run updates remotely over SSH
* Interactive CLI menu (dialog-based UI)
* Centralized logging
* Simple config files
* No agents required
* Works with existing SSH setup
--- ---
## Update Manager UI ## ⚡ Features
### Main menu * 🔁 Batch translation (packed subtitles)
* 💾 Disk cache (persistent across restarts)
<p align="center"> * ⚡ Reduced API usage via caching
<img src="docs/images/menu-main.png" width="50%" alt="Main menu"> * 🧠 Smart fallback per subtitle line
</p> * 🐳 Docker-based deployment
* 📡 API-driven translation flow
### Log menu * 📊 Progress tracking support
<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 ## ⚡ Quick Start
### 1. Clone project
```bash ```bash
git clone https://github.com/YOUR-USER/update-manager.git git clone https://git.lanx.dk/ed/subfox.git
cd update-manager cd subfox
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
``` ```
--- ---
## SSH Setup (Required) ### 2. Setup environment
Update Manager uses SSH to connect to your hosts. Create `.env`:
You must have SSH key-based authentication set up (no password prompts). ```env
OPENAI_API_KEY=your_api_key_here
### Generate SSH key (if not already done)
```bash
ssh-keygen -t ed25519
``` ```
--- ---
### Copy key to hosts ### 3. Start with Docker
```bash ```bash
ssh-copy-id user@192.168.1.10 docker compose up -d --build
ssh-copy-id user@192.168.1.20
ssh-copy-id user@192.168.1.30
``` ```
--- ---
### Test connection ### 4. Open in browser
```bash
ssh user@192.168.1.10
``` ```
http://localhost:8000
You should be able to connect **without entering a password**.
> ⚠️ If SSH is not configured, the tool will fail or hang during execution.
---
## Configuration
### Copy config files
```bash
cp update-manager.conf.example update-manager.conf
cp hosts.conf.example hosts.conf
``` ```
--- ---
### Edit hosts ## 🧠 How it Works
```bash ```text
nano hosts.conf Upload SRT
Parse blocks
Batch translation (packed)
Cache lookup
OpenAI (if needed)
Fallback per-line (if mismatch)
Return translated subtitles
``` ```
---
## 💾 Cache System
SubFox uses a disk-based cache:
* Stored in `/data/cache`
* Persisted via Docker volume
* One file per translation (hashed key)
Example: Example:
```bash ```text
# name ip user /data/cache/en_da/
server1 192.168.1.10 user ├── a1b2c3d4.json
server2 192.168.1.20 user ├── f6g7h8i9.json
server3 192.168.1.30 user
``` ```
--- ---
## Usage ## 🐳 Docker Configuration
### Check updates Example volume setup:
```bash ```yaml
update-manager check volumes:
``` - ./uploads:/app/uploads
- ./outputs:/app/outputs
### Start UI - /mnt/user/appdata/subfox/cache:/data/cache
```bash
update-manager-ui
``` ```
--- ---
## Logging ## 📡 API
Log file location: ### Version endpoint
```bash ```bash
/opt/update-manager/log/update-manager.log GET /version
``` ```
View log: Response:
```bash ```json
less /opt/update-manager/log/update-manager.log {
``` "version": "0.1.0"
}
Follow log:
```bash
tail -f /opt/update-manager/log/update-manager.log
``` ```
--- ---
## File Structure ## 📜 Changelog
```bash See [CHANGELOG.md](CHANGELOG.md)
/opt/update-manager/
├── update-manager.sh
├── update-manager-ui.sh
├── update-manager.conf
├── hosts.conf
├── log/
│ └── update-manager.log
```
--- ---
## How it works ## 🛠 Tech Stack
* Uses SSH to connect to each host * Python 3.11
* Runs `apt` commands remotely * FastAPI
* Logs results locally * OpenAI API
* No agents or services needed * Docker
* Designed for simple and efficient operations * JSON-based disk cache
---
## 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)
--- ---
## ❤️ Credits ## ❤️ Credits
Built with ❤️ for Lanx by [NodeFox 🦊](https://nodefox.lanx.dk) 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.
---