/ceefax

Python3 implementation of CEEFAX page generator from online content

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

CEEFAX

This is a set of Python3 scripts which generate a Ceefax-like teletext service from the following websites:

  • BBC News
  • BBC Sport
  • UK Met Office

It can be configured using the YAML file defaults.yaml.

The output is in the "Viewdata escaped" version of the TTI file format.

Modules required to use

  • dateutil, to parse dates from feeds

    sudo apt install python3-dateutil
    
  • AdvancedHTMLParser, to extract information from HTML pages

    pip3 install AdvancedHTMLParser
    

    NB. There's a bug in AdvancedHTMLParser: kata198/AdvancedHTMLParser#12

    Run

    pico +1272 ~/.local/lib/python3.7/site-packages/AdvancedHTMLParser/Parser.py
    

    and change "self.useIndex" to "useIndex".

  • CacheControl, to cache fetched pages. Filecache stores the contents in the fileystem

    pip3 install CacheControl[filecache]
    
  • feedparser, to fetch and parse RSS feeds.

    pip3 install feedparser
    
  • PyYAML, to read the configuration file.

    pip3 install PyYAML
    
  • MetOffer. Fixed version included here as upstream version has bugs which haven't been fixed for 18 months.

Credits

I'm indebted to Nathan for originally writing makeceefax.php, and for his subsequent help and encouragement.

Other resources

Teletext on the Raspberry Pi