Dexter

Contents

Dexter

Dexter is a teletext/text-tv reader application, which you can quickly read web-based implementations. It is designed so that you can manually add the sites that you want to follow.

Dexter is currently in Extras-devel. It is highly under development and is not intended for the faint of heart! Please, test it at your own risk. That said, all testing and feedback is appreciated.

For feedback and discussion about Dexter


Config file

In order to enable support for various implementations of teletext sites, the site specific information can be added to a config file.

Config file is located at $HOME/.config/Dexter/dexter.conf and it can be modified directly from xterm to add/edit/remove sites.

Important note: In Dexter 0.2-2, Finnish Yle needs to be in the config. If config file is not found, it is created with Yle. So, run Dexter once before editing config file manually. Then, don't delete Yle. This will change in the future releases.

The config file has a subsection [sites], which lists all the available text-tv sites for Dexter. Each site has a unique id number in front of every line and each line has a site specific setting parameter. After sites, there is a size parameter, which needs to be the amount of sites in this section.

Example config file

This is an example config file with two working text-tv sites.

[sites]
1\siteName=Mtv3
1\imageUrl=http://www.mtv3tekstikanava.fi/new2008/images/[page]-[subpage].gif
1\predictionUrl=http://www.mtv3tekstikanava.fi/new2008/[page]-01.htm
1\subPredictionUrl=http://www.mtv3tekstikanava.fi/new2008/[page]-[subpage].htm
1\previousPrediction="<a href=\"(\\d+)-01.htm\"><< Edellinen sivu</a>"
1\nextPrediction="<a href=\"(\\d+)-01.htm\">Seuraava sivu >></a>"
1\previousSubPrediction="<a href=\"\\d+-(\\d+).htm\"><< alasivu</a>"
1\nextSubPrediction="<a href=\"\\d+-(\\d+).htm\">alasivu >></a>"
1\pad=2
2\siteName=Yle
2\imageUrl=http://www.yle.fi/tekstitv/images/P[page]_[subpage].gif
2\predictionUrl=http://www.yle.fi/tekstitv/txt/P[page]_01.html
2\subPredictionUrl=http://www.yle.fi/tekstitv/txt/P[page]_[subpage].html
2\previousPrediction="<A HREF=\"http://www.yle.fi/tekstitv/txt/P(\\d+)_01.html\">\\[Edellinen sivu\\]</A>"
2\nextPrediction="<A HREF=\"http://www.yle.fi/tekstitv/txt/P(\\d+)_01.html\">\\[Seuraava sivu\\]</A>"
2\previousSubPrediction="<A HREF=\"http://www.yle.fi/tekstitv/txt/P(\\d+)_(\\d+).html\">\\[Edellinen alasivu\\]</A>"
2\nextSubPrediction="<A HREF=\"http://www.yle.fi/tekstitv/txt/P(\\d+)_(\\d+).html\">\\[Seuraava alasivu\\]</A>"
2\pad=2
size=2


Site specific parameters

  • imageUrl: Where the actual image of the page is located at.
  • predictionUrl: A html page where the previous/next page number can be found and parsed
  • subPredictionUrl: Similar, but for parsing subpage prediction
  • previousPrediction: Regular expression to find the previous page number. Find this from the source code and replace page number with (\\d+).
  • nextPrediction: Similar, but for next page.
  • previousSubPrediction: Similar, but for previous subpage.
  • nextSubPrediction: Similar, but for next subpage.
  • pad: How many digits are used in the subpage. This varies between the sites, so it was important to be able to change this. For example, finnish sites then to use padding 2, which would make subpage 1 to be 01.

Url variables for config parameters

There are a few variables that should be used when defining url's for the sites. These are [page], [subpage] and [topicpage].

Dexter will replace these variables with the correct value on the fly.

  • [page]: The current page number
  • [subpage]: The current subpage number
  • [topicpage]: The topic page for the current page. For example, for a page number 165, topic page would be 100. For 401, topic page would be 400.

Replace page numbers in the url with these variables. This is needed for Dexter to work properly.


Prediction regular expressions

In order for Dexter to be able to "predict" the next/previous page, regular expressions are used. Dexter will match the regular expression and find the correct prediction. For example, if you are at page 145 and next page is 168, user presses next page, it will know to go to 168 instead of trying page number 146.

Regular expressions need to specify the string that has the information about the wanted prediction. When there are page numbers in the regular expression, make sure to use \\d+ instead of the static number. When you have the number you want, replace the static number with (\\d+). This will tell Dexter to save that as the predicted page number.


Working teletext/text-tv sites

Here is the list of teletext/text-tv sites found working with Dexter. When you find a new one, please add it to the list under the correct country. Also, the unique number at the beginning of every parameter should be replaced with "x", so that they don't collide. When you copy an entry, make sure to change this value to be a unique value for your config.


Finland

Yle
x\siteName=Yle
x\imageUrl=http://www.yle.fi/tekstitv/images/P[page]_[subpage].gif
x\predictionUrl=http://www.yle.fi/tekstitv/txt/P[page]_01.html
x\subPredictionUrl=http://www.yle.fi/tekstitv/txt/P[page]_[subpage].html
x\previousPrediction="<A HREF=\"http://www.yle.fi/tekstitv/txt/P(\\d+)_01.html\">\\[Edellinen sivu\\]</A>"
x\nextPrediction="<A HREF=\"http://www.yle.fi/tekstitv/txt/P(\\d+)_01.html\">\\[Seuraava sivu\\]</A>"
x\previousSubPrediction="<A HREF=\"http://www.yle.fi/tekstitv/txt/P\\d+_(\\d+).html\">\\[Edellinen alasivu\\]</A>"
x\nextSubPrediction="<A HREF=\"http://www.yle.fi/tekstitv/txt/P\\d+_(\\d+).html\">\\[Seuraava alasivu\\]</A>"
x\pad=2
Mtv3
x\siteName=Mtv3
x\imageUrl=http://www.mtv3tekstikanava.fi/new2008/images/[page]-[subpage].gif
x\predictionUrl=http://www.mtv3tekstikanava.fi/new2008/[page]-01.htm
x\subPredictionUrl=http://www.mtv3tekstikanava.fi/new2008/[page]-[subpage].htm
x\previousPrediction="<a href=\"(\\d+)-01.htm\"><< Edellinen sivu</a>"
x\nextPrediction="<a href=\"(\\d+)-01.htm\">Seuraava sivu >></a>"
x\previousSubPrediction="<a href=\"\\d+-(\\d+).htm\"><< alasivu</a>"
x\nextSubPrediction="<a href=\"\\d+-(\\d+).htm\">alasivu >></a>"
x\pad=2
Nelonen

(Only subpages 1 to 9 can be used. Dexter doesn't seem to handle different padding for imageUrl and predictionUrl at the moment. ImageUrl is ex. 100_0001 and subPredictionUrl has ?page=100&subpage=3)

x\siteName=Nelonen
x\imageUrl=http://www.nelonen.fi/teksti4/pages/[page]_000[subpage].gif
x\predictionUrl=http://www.nelonen.fi/teksti4/?page=[page]
x\subPredictionUrl=http://www.nelonen.fi/teksti4/?page=[page]&subpage=[subpage]
x\previousPrediction="<a href=\".page=(\\d+)\"><img src=\"images/alalaita_edellinen.gif\".+></a>"
x\nextPrediction="<a href=\".page=(\\d+)\"><img src=\"images/alalaita_seuraava.gif\".+></a>"
x\previousSubPrediction="<a href=\".page=\\d+&subpage=(\\d+)\"><img src=\"images/alalaita_edellinen_ala.gif\".+></a>"
x\nextSubPrediction="<a href=\".page=\\d+&subpage=(\\d+)\"><img src=\"images/alalaita_seuraava_ala.gif\".+></a>"
x\pad=1

Dutch

NOS
x\siteName=NOS
x\imageUrl=http://teletekst.nos.nl/gif/images/[page]-[subpage].gif
x\predictionUrl=http://teletekst.nos.nl/gif/[page]-[subpage].html
x\subPredictionUrl=http://teletekst.nos.nl/gif/[page]-[subpage].html
x\previousPrediction="<a href=\"(\\d+)-\\d+.html\"><img src=\"/gfx/i-buttons/back.gif\""
x\nextPrediction="<a href=\"(\\d+)-\\d+.html\"><img src=\"/gfx/i-buttons/forward.gif\""
x\previousSubPrediction="<a href=\"\\d+-(\\d+).html\"><img src=\"/gfx/i-buttons/sub_back.gif\""
x\nextSubPrediction="<a href=\"\\d+-(\\d+).html\"><img src=\"/gfx/i-buttons/sub_forward.gif\""
x\pad=2