Files
Teletext-Editor/check_ttx6.py
Daniel Dybing 42e189635b
Some checks failed
Build Linux / Build Linux (push) Successful in 1m34s
Build Windows / Build Windows (push) Failing after 40s
Configure Gitea Workflows and Add Build Scripts
- Update build-linux.yaml to use standard Ubuntu runner.
- Update build-windows.yaml to use tobix/pywine container for cross-compilation on Linux.
- Add build_app.py and check_ttx6.py helper scripts.
2026-01-13 17:48:00 +01:00

29 lines
921 B
Python

import sys
import os
# Add src to path
sys.path.append(os.path.join(os.getcwd(), 'src'))
from teletext.io import load_t42
def check_file(filename):
if not os.path.exists(filename):
print(f"File {filename} not found")
return
service = load_t42(filename)
print(f"Analysis of {filename}:")
print(f"Total packets: {len(service.all_packets)}")
print(f"Total pages: {len(service.pages)}")
language_names = ["English", "German", "Swedish/Finnish", "Italian", "French", "Portuguese/Spanish", "Turkish", "Romania"]
for i, page in enumerate(service.pages):
lang_idx = page.language
lang_name = language_names[lang_idx] if 0 <= lang_idx < len(language_names) else f"Unknown ({lang_idx})"
print(f"Page {i+1}: Mag {page.magazine} Num {page.page_number:02d}, Lang: {lang_idx} ({lang_name})")
if __name__ == "__main__":
check_file("TTX-6_RAW.t42")