# Teletext Editor

A cross-platform (Linux/Windows) desktop application for viewing, creating, and editing Teletext pages. This tool is designed to work with the `.t42` file format, providing a robust environment for Teletext recovery and design.

![Application Screenshot](screenshot.png)

## Features

-   **File Support:** Load and save standard `.t42` Teletext data files.
-   **Navigation:**
    -   Browse pages using a list with Hexadecimal ID support (e.g., 100, 1FF).
    -   Full support for navigating subpages.
-   **Visual Editor:**
    -   Direct "canvas" grid editing.
    -   **Hex Inspector:** View and manually edit the raw byte value of the selected cell.
    -   **Control Characters:** Quick access buttons for inserting standard Teletext colors (Red, Green, Yellow, Blue, Magenta, Cyan, White).
-   **National Option Sets:** Correctly renders characters for various languages (English, German, Swedish/Finnish, etc.) based on page metadata.
-   **Productivity Tools:**
    -   Undo/Redo support.
    -   Copy/Paste row content between pages.
    -   Unsaved changes warning.

## How to Build Manually

The application is built using Python and PyQt6, and packaged into a standalone executable using PyInstaller. A helper script `build_app.py` is provided to streamline the process.

### Prerequisites

-   Python 3.10 or higher
-   Install dependencies:
    ```bash
    pip install -r requirements.txt
    ```

### Build Steps

1.  Open a terminal in the project's root directory.
2.  Run the build script:
    ```bash
    python build_app.py
    ```
3.  The build script will clean previous builds, detect your OS, and run PyInstaller with the correct configuration.
4.  Once complete, the standalone executable will be available in the `dist/` folder:
    -   **Linux:** `dist/TeletextEditor_Linux`
    -   **Windows:** `dist/TeletextEditor_Windows.exe`

> **Note for Cross-Compilation:**
> The build script produces an executable for the **current OS** running the script. To build the Windows executable on Linux, you can use Wine (as configured in the Gitea workflow) or run the script natively on a Windows machine.
