ali1234 / vhs-teletext

Software to recover teletext data from VHS recordings.
GNU General Public License v3.0
179 stars 21 forks source link

Improve the way finders are defined #71

Open ali1234 opened 2 years ago

ali1234 commented 2 years ago

https://github.com/ali1234/vhs-teletext/blob/088da3911d610910fbe9b383d9382b4c602c1617/teletext/finders.py#L144

Currently finders use two strings. One contains a literal example of a header and the other contains special characters that define how the header can vary. It works well for UK Teletext/Oracle/Ceefax but has problems with other broadcasts from countries:

One possible way to improve the finders would be to use regular expressions. This would allow any arbitrary type of header to be matched. However the finder needs to do fuzzy matching with ranking based on the type of match. Also, regular expressions would probably be even harder to understand - although they are at least a standard rather than something I have made up.