Dexter

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="&lt;&lt; Edellinen sivu" 1\nextPrediction="Seuraava sivu &gt;&gt;" 1\previousSubPrediction="&lt;&lt; alasivu" 1\nextSubPrediction="alasivu &gt;&gt;" 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="\\[Edellinen sivu\\]" 2\nextPrediction="\\[Seuraava sivu\\]" 2\previousSubPrediction="\\[Edellinen alasivu\\]" 2\nextSubPrediction="\\[Seuraava alasivu\\]" 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.

Replace page numbers in the url with these variables. This is needed for Dexter to work properly.
 * [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.

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.

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="\\[Edellinen sivu\\]</A>" x\nextPrediction="\\[Seuraava sivu\\]</A>" x\previousSubPrediction="\\[Edellinen alasivu\\]</A>" x\nextSubPrediction="\\[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\">&lt;&lt; Edellinen sivu</a>" x\nextPrediction="<a href=\"(\\d+)-01.htm\">Seuraava sivu &gt;&gt;</a>" x\previousSubPrediction="<a href=\"\\d+-(\\d+).htm\">&lt;&lt; alasivu</a>" x\nextSubPrediction="<a href=\"\\d+-(\\d+).htm\">alasivu &gt;&gt;</a>" x\pad=2