Metadata-Version: 2.3
Name: abertpy
Version: 0.1.2
Summary: 
License: GPL3
Author: Valentin Kivachuk Burda
Author-email: vk18496@gmail.com
Requires-Python: >=3.12,<4.0
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: aiohttp (>=3.13.1,<4.0.0)
Requires-Dist: asyncstdlib (>=3.13.1,<4.0.0)
Requires-Dist: backoff (>=2.2.1,<3.0.0)
Requires-Dist: loguru (>=0.7.3,<0.8.0)
Requires-Dist: pydantic (>=2,<3)
Requires-Dist: pydantic-typer (>=0.0.13,<0.0.14)
Requires-Dist: typer (>=0.20.0,<0.21.0)
Description-Content-Type: text/markdown

# abertpy

## Overview

**abertpy** is a utility designed to enable Spanish TDT (Digital Terrestrial Television) reception via the Hispasat 30.0W satellite using TVHeadend. Unlike other tools that depend on proprietary hardware or closed setups, abertpy offers a more flexible and automated integration with TVHeadend.

### Key Features

- 🔄 Automatically recreates MUXes based on live reception (no static lists)
- 📅 EPG (Electronic Program Guide) support
- 🌐 Supports both local and remote TVHeadend setups (local is recommended)
- 🧩 Fully integrated. No external scripts required

---

## Prerequisites

Before installing abertpy, ensure the following components are properly set up:

- ✅ A working TVHeadend instance already receiving Abertis channels via Hispasat 30.0W
- 🧪 [TSDuck](https://tsduck.io/) installed (specifically the `tsanalyze` binary)
- 🔐 [Oscam-emu](https://hub.docker.com/r/chris230291/oscam-emu) running and configured in TVHeadend  
  - ⚠️ Use **CCcam** protocol instead of **DVB-API**
- 📦 [pipx](https://github.com/pypa/pipx) installed (optional but recommended)

---

## Installation

1. **Install abertpy globally via pipx:**
   ```bash
   sudo pipx install --global abertpy
   ```

2. **Verify TVHeadend can access abertpy:**
   ```bash
   sudo su hts -s /bin/bash -c "abertpy ping"
   ```

3. **Discover your Hispasat network UUID (this will fail intentionally to list available networks):**
   ```bash
   abertpy -t http://tvheadend.lan:9981/
   ```

4. **Run the setup with the correct network UUID:**
   ```bash
   abertpy -t http://tvheadend.lan:9981/ -n <your_network_uuid>
   ```

5. **(Optional) Add or update your SoftCam.key file:**
   [SoftCam.key gist](https://gist.github.com/vk496/c524292b974837b4a17fe7264f412284)

