maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Dexter - Text-TV Reader (https://talk.maemo.org/showthread.php?t=42207)

jakoleh 2010-02-10 19:40

Re: Dexter - Text-TV Reader
 
Quote:

Originally Posted by copperviking (Post 519917)
Can somebody help me? I manage to edit the confic file (mtv3 and yle), but I can only see yle in Dexter settings. Where is mtv3?

Have you changed the size parameter?

stefanmohl 2010-02-10 20:42

Re: Dexter - Text-TV Reader
 
Many new televisions have memory to store 1000 pages. The pages are numbered from 000-999, so not counting sub-pages, the maximum is 1000 pages. Since most numbers aren't used, the real total is probably a lot less, even counting sub-pages. I think a page is roughly 40x25 characters, making it about 1kB per page, so storing all pages from a channel only takes about 1 MB :-)

How about a similar feature in Dexter? Add an option to download all pages from a channel, and store them. That way it will be even faster than now, and it will have all pages available even when off-line!

copperviking 2010-02-11 04:45

Re: Dexter - Text-TV Reader
 
My config file was copied from wiki. I did not edit it. It look like this: [sites]
1\siteName=Mtv3
1\imageUrl=http://www.mtv3tekstikanava.fi/new2008/images/[page]-[2:subpage].gif
1\predictionUrl=http://www.mtv3tekstikanava.fi/new2008/[page]-01.htm
1\subPredictionUrl=http://www.mtv3tekstikanava.fi/new2008/[page]-[2: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\startPage=100
2\siteName=Yle
2\imageUrl=http://www.yle.fi/tekstitv/images/P[page]_[2:subpage].gif
2\predictionUrl=http://www.yle.fi/tekstitv/txt/P[page]_01.html
2\subPredictionUrl=http://www.yle.fi/tekstitv/txt/P[page]_[2: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\startPage=100
size=2

copperviking 2010-02-11 04:52

Re: Dexter - Text-TV Reader
 
Quote:

Originally Posted by jakoleh (Post 520008)
Have you changed the size parameter?

My config file was copied from wiki. I did not edit it. It look like this. Is there something wrong? [sites]
1\siteName=Mtv3
1\imageUrl=http://www.mtv3tekstikanava.fi/new2008/images/[page]-[2:subpage].gif
1\predictionUrl=http://www.mtv3tekstikanava.fi/new2008/[page]-01.htm
1\subPredictionUrl=http://www.mtv3tekstikanava.fi/new2008/[page]-[2: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\startPage=100
2\siteName=Yle
2\imageUrl=http://www.yle.fi/tekstitv/images/P[page]_[2:subpage].gif
2\predictionUrl=http://www.yle.fi/tekstitv/txt/P[page]_01.html
2\subPredictionUrl=http://www.yle.fi/tekstitv/txt/P[page]_[2: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\startPage=100
size=2

AlexV12 2010-02-11 13:27

Re: Dexter - Text-TV Reader
 
I tried using the NOS config file, and it looks like it loaded. but now it doesn't even show the frontpage (page 100). it also wont show any other pages.

how can i edit the dexter file using Xterminal so that all the parameters are correct? (if they might not be).

or can i just edit the file opening the dexter.conf with notepad?

thanks

benny1967 2010-02-11 13:43

Re: Dexter - Text-TV Reader
 
@Alex: you did include the missing parts for you NOS setup, did you? like the [sites] marker at the beginning, the numbers at the start of the lines, the size parameter at the end?

@copperviking:
how did you copy the file over to your n900? i'm asking because there's a slight chance you got wrong formating if you used an inappropriate text editor.


could both of you just open the terminal and type
Code:

cat .config/Dexter/dexter.config
The output would be interesting.

copperviking 2010-02-11 14:42

Re: Dexter - Text-TV Reader
 
Quote:

Originally Posted by benny1967 (Post 521141)
@Alex: you did include the missing parts for you NOS setup, did you? like the [sites] marker at the beginning, the numbers at the start of the lines, the size parameter at the end?

@copperviking:
how did you copy the file over to your n900? i'm asking because there's a slight chance you got wrong formating if you used an inappropriate text editor.


could both of you just open the terminal and type
Code:

cat .config/Dexter/dexter.config
The output would be interesting.

I type that code in x-terminal, but it says not found......

copperviking 2010-02-11 15:50

Re: Dexter - Text-TV Reader
 
Can somebody tell me how to delete the dexter.config file in x-term.
What do I type in x-term? I try to start over hole thing to edit the config file to use mtv3 and yle. I just dont get it. I can edit config file, but it just shows yle. Do I have to edit those working donfig files in wiki? And what folder is empty Dextermv in home/user/config/.?

AlexV12 2010-02-11 18:17

Re: Dexter - Text-TV Reader
 
Quote:

Originally Posted by benny1967 (Post 521141)
@Alex: you did include the missing parts for you NOS setup, did you? like the [sites] marker at the beginning, the numbers at the start of the lines, the size parameter at the end?

@copperviking:
how did you copy the file over to your n900? i'm asking because there's a slight chance you got wrong formating if you used an inappropriate text editor.


could both of you just open the terminal and type
Code:

cat .config/Dexter/dexter.config
The output would be interesting.

i just copied the text from http://wiki.maemo.org/Dexter

When i type the code you gave in Xterminal i get "no such file or directory" :(

benny1967 2010-02-11 18:24

Re: Dexter - Text-TV Reader
 
sorry! sorry!
it should have been

cat .config/Dexter/dexter.conf

AlexV12 2010-02-11 18:38

Re: Dexter - Text-TV Reader
 
i get lots of text, each with www.yle.fi in it.

i guess that is the problem:P

how to fix this?

ratel 2010-02-11 20:48

Re: Dexter - Text-TV Reader
 
Great app!! Thnx!

Palleman 2010-02-11 23:41

Re: Dexter - Text-TV Reader
 
The links:
Code:

            <a href="?page=111" class="previous">&laquo;111 föregående sida</a>
            <a href="?page=113" class="next">nästa sida 113&raquo;</a>

The regexps:
Code:

1\previousPrediction=".*href=\"\\?page=(\\d+)\" class=\"previous.*"
1\nextPrediction=".*href=\"\\?page=(\\d+)\" class=\"next.*"

Won't work. Nothing happens when clicking on next/previous. Any ideas?

Palleman 2010-02-11 23:45

Re: Dexter - Text-TV Reader
 
Next problem: TV4.

There is no previous/next subpage. They load all of them at page load, and then use javascript to show/hide them.

Code:

                <li><a href="" onclick="texttv.show(1); return false;">1</a></li>
                <li><a href="" onclick="texttv.show(2); return false;">2</a></li>
                <li><a href="" onclick="texttv.show(3); return false;">3</a></li>
            <li><a href="" onclick="texttv.show(); return false;">Visa alla delsidor</a></li>

/P

Palleman 2010-02-11 23:47

Re: Dexter - Text-TV Reader
 
And yet another problem: SVT use text based Text-TV, i.e. it's not shown as images. You can choose between "TV" layout and "Web" layout, but they are both text based:

TV layout
Web layout

/P

pillar 2010-02-12 08:41

Re: Dexter - Text-TV Reader
 
It's amazing how many different implementations there are! I guess now I see the value of standardization. I cannot think of any real solution to SVT and TV4 subpage is a tough one too.

About sites that don't make it easy to do predictions, I suggest the following:

- I could make an option to disable them for a site. That way at least the user is not confused about them. I don't want to get rid of them altogether since they are so nice when they do work.

- When, thanks to all of your work, we have mapped the situation with most of the sites, we can assess the situation. How many are not working and see if they have similarities. I have structured the application so that I could easily create a custom class with different parsing logic.

So, what can you do right now? You can edit the Wiki page and add ALL text-tv sites to the list, even if they are partially working or not working at all. The entries should then also have a percentage how much they are working. for example, a site that works, but subpage prediction doesn't work, could get 80% working and then explanation what is not working. A link to the website would also be useful.

What do you think? Thanks for your help to make Dexter even better and more comprehensive tool for all of us!

benny1967 2010-02-12 09:24

Re: Dexter - Text-TV Reader
 
Quote:

Originally Posted by pillar (Post 522611)
About sites that don't make it easy to do predictions, I suggest the following:

- I could make an option to disable them for a site. That way at least the user is not confused about them. I don't want to get rid of them altogether since they are so nice when they do work

... which would be easily controlled via the config file. no line for the prediction URL means buttons aren't visible in the UI. easy. ;)



OTOH: if there's no prediction URL that works reliably, you still have to find a way to cycle through sub-pages. and, frankly, in most cases the next page will be pagenumber+1, anyway.
so a different approach would be to simply assume page+1 if no prediction url is given (and assume subpage+1 if there's no info about subpages). only if the (sub)imageUrl for subpage+1 doesn't exist, the "next subpage" button would be greyed out. - if pagenumber+1 doesn't exist, the application could even show a "please stand by" message and try to fetch page+2, page+3, page+4... until a new, valid imageUrl is found...


EDIT:
and about those services that use mechanisms other than "teletext page as bitmap graphics" (text like ARD, flash like some German TV stations, Java implementations,....) - I think this would be something for version 6.0 of Dexter. ;)
There's a lot of stations that will work with the current application logic- Next step might be to include those that show teletext as text or HTML on the internet... but going further and parsing flash/java sites isn't worth the effort IMHO.

Palleman 2010-02-12 15:00

Re: Dexter - Text-TV Reader
 
There are "show web page as image" services out there. You could try using one of those (or some module with this functionality) to support sites with no bitmap image view.

The TV4 subpage problem could be solved by checking what numbers are there, but it might be too much work to support only one site.

What about the first problem - with the TV4 page prediction regexps not working? I've tried replacing a lot of the non-alphanumeric with .+ or .* and I've tried changing the regexp to include more and less of the line, but they still won't work. Any ideas?

pillar 2010-02-12 21:10

Re: Dexter - Text-TV Reader
 
@Palleman You could try without those .* in the beginning and the end. They are not needed.

fgs 2010-02-12 21:49

Re: Dexter - Text-TV Reader
 
Italian television RAI did not reply to my email, but I just noticed that they have fixed the text-only version of their text-tv website. Now it can be supported by Dexter. :cool:

I have just added RAI configuration to the Wiki page.

Unfortunately, page prediction in the RAI website is not implemented perfectly: empty pages are not skipped. This affects both text-only and graphical websites, so I think we can't do anything. I am afraid to bother them with another, much larger, request. :p

Palleman 2010-02-12 23:57

Re: Dexter - Text-TV Reader
 
Added TV4 to the Wiki (without subpages). Didn't add totally non-functioning SVT. Could this be something?

copperviking 2010-02-13 16:22

Re: Dexter - Text-TV Reader
 
Thanks to all of you!!!! Now it works fine. I dont know was it because I flashed my N900 or something else. This time I copy config file from wiki with my windows pc and move it to my N900. But anyway it works! Great application. THANK YOU!!!!

benny1967 2010-02-13 18:18

Re: Dexter - Text-TV Reader
 
4 Attachment(s)
I see a strange bug in pages from 3sat and ORF:

the last column is cut off. it took me a while to notice, because usually there's no letter in this last column, but sometimes there is... and sometimes it even contains the last digit of a page number. Any idea why this happens? (I only see it in landscape mode, btw. portrait seems to be fine in all cases.)

megaexer 2010-02-13 18:38

Re: Dexter - Text-TV Reader
 
I can't install it, there's some conflict:

libqt4-maemo5-dbus (4.6.0~git20100119-1maemo1)
libqt4-maemo5-gui (4.6.0~git20100119-1maemo1)
libqt4-maemo5-xml (4.6.0~git20100119-1maemo1)

copperviking 2010-02-16 07:08

Re: Dexter - Text-TV Reader
 
I have a problem with mtv3. Next/Prev page dont work. Also subpages dont work. Do someone else have same problem, or is it on my config file, that I copied from wiki.........? Yle Next/prew or subpages dont work either.....

pillar 2010-02-16 08:50

Re: Dexter - Text-TV Reader
 
@copperviking Mtv3 uses &lt: for < and &gt; for > signs, but on the wiki page these are translated to the actual signs. You might get it working if you replace those in your config. At least it did the trick for me.
If someone knows how to keep those signs as they were input to the wiki, please edit it to make it show correctly.

@megaexer There has been quite rapid flow of new versions of qt 4.6(.2) so it might be that the versions are conflicting. I cannot even remember which version exactly was the last Dexter build compiled. I just upgraded to Qt 4.6.2 final and I will make a build with that. Hopefully this kind of dependency problems are a thing of the past then (well, after everyone upgrades anyways).

@benny1967 The bug is most likely the fact that the image has a different aspect ratio than Yle images, which I used to develop Dexter at first. Right now the scaling is hard coded, since I couldn't figure out how to find out how much room there is left in the layout for the image. This is definitely an area that could be improved, but I don't exactly know the details of qt layout stuff well enough.

copperviking 2010-02-17 04:49

Re: Dexter - Text-TV Reader
 
Quote:

Originally Posted by pillar (Post 528981)
@copperviking Mtv3 uses &lt: for < and &gt; for > signs, but on the wiki page these are translated to the actual signs. You might get it working if you replace those in your config. At least it did the trick for me.
If someone knows how to keep those signs as they were input to the wiki, please edit it to make it show correctly.

@megaexer There has been quite rapid flow of new versions of qt 4.6(.2) so it might be that the versions are conflicting. I cannot even remember which version exactly was the last Dexter build compiled. I just upgraded to Qt 4.6.2 final and I will make a build with that. Hopefully this kind of dependency problems are a thing of the past then (well, after everyone upgrades anyways).

@benny1967 The bug is most likely the fact that the image has a different aspect ratio than Yle images, which I used to develop Dexter at first. Right now the scaling is hard coded, since I couldn't figure out how to find out how much room there is left in the layout for the image. This is definitely an area that could be improved, but I don't exactly know the details of qt layout stuff well enough.

I cant get it working. I try to edit config file, but Dexter dont show subpages/next/prev pages. Thats a shame, because it is almost useles without that. I must try again when I have more time. Thanks anyway!

benny1967 2010-02-17 09:06

Re: Dexter - Text-TV Reader
 
Quote:

Originally Posted by pillar (Post 528981)
@copperviking Mtv3 uses &lt: for < and &gt; for > signs, but on the wiki page these are translated to the actual signs. You might get it working if you replace those in your config. At least it did the trick for me.
If someone knows how to keep those signs as they were input to the wiki, please edit it to make it show correctly.

You have to replace the ampersand with "&amp;", so instead of "&gt;" you write "&amp;gt;".

I added a notice about this about this at the top of the section and changed the entry for Mtv3 accordingly. Hope there's nothing wrong about it now.

megaexer 2010-02-17 19:02

Re: Dexter - Text-TV Reader
 
Now after a firmware update I can install the app. Nice work

I suggest full keyboard control in fullscreen mode.

copperviking 2010-02-18 16:26

Re: Dexter - Text-TV Reader
 
Quote:

Originally Posted by benny1967 (Post 531696)
You have to replace the ampersand with "&amp;", so instead of "&gt;" you write "&amp;gt;".

I added a notice about this about this at the top of the section and changed the entry for Mtv3 accordingly. Hope there's nothing wrong about it now.

Thanks! Now Mtv3 works almost perfect. Only thing is, that subpage numbers (eg. 1/3) dont show up in right corner. Subpages work, but you cant see them. I must look the config file, but I think that I dont understand, what might be wrong. But finally IT WORKS! Thanks!

pillar 2010-02-18 17:26

Re: Dexter - Text-TV Reader
 
Mtv3 is weird in that day don't have the subpage numbers in the image. Are there others like it? I could show the current subpage close to the page number, although getting how many subpages there are in a page would not still work.

benny1967 2010-02-20 16:46

Re: Dexter - Text-TV Reader
 
went through the listing on
http://www.teletext-online.de.vu/
and added a few working sites. surprised how many won't work with the dexter logic.... mainly because:
  • subpages aren't numbered; they use A, B, C... to indicate subpage 1, 2, 3. This is mainly in the Czech Republik and Slovakia.
  • subpages aren't given as "prev"/"next", but there's a list of links for all the possible subpages. a human user can click on 1, 2, 3..., but dexter wouldn't know what's *next*
    (The best in this category are the spanish stations: they give you the first 10 subpages as links plus a ">>" that does not link to the next subpage, as expected, but to the list for subpages 11, 12, 13...)
  • prev/next for both pages and/or subpages do exist as links or buttons, but the HTML around those links doesn't contain a reference to the previous/next (sub)page. instead, they like to a server side script (ā la "cgi/getnext") and the HTML on the page itself is always the same.

difficult... but not impossible. :D

megaexer 2010-02-22 19:26

Re: Dexter - Text-TV Reader
 
Another idea in fullscreen mode: swipe left/right to change the teletext page, and swipe up/down to change the sub page, with a slide transition. :-)

pillar 2010-03-03 22:26

Re: Dexter - Text-TV Reader
 
Worked on other projects for a while, but decided to give Dexter some love as well :)

0.2-4 pushed to Extras-devel. Added experimental gesture support to swipe right for next page, left for previous, up for next subpage and down for previous subpage. Working in both modes. Let me know how well it works for you.

Thanks for the idea megaexer and huge thanks for lbt sharing the gesture code.

fgs 2010-03-19 18:18

Re: Dexter - Text-TV Reader
 
I just found a very long list of text-tv websites:
http://wwitv.com/portal.htm?http://w...m/teletext_tv/
I made some sample checks, not every link is valid and not every text-tv seems Dexter-compatible.

Snaps 2010-03-30 08:21

Re: Dexter - Text-TV Reader
 
Any UK teletext links?

Can I add my own?

Also, why is the Dexter name not centered with the icon?

pillar 2010-03-30 09:25

Re: Dexter - Text-TV Reader
 
@Snaps you are welcome and even encouraged to add your own. Please read the wiki found in the first post of this thread to find out how.

Concerning the name being not centered, I have no idea. Anyone? I'll fix it if someone can tell me what's causing it!

JohnLF 2010-03-30 09:48

Re: Dexter - Text-TV Reader
 
I tried to decode the BBC websites but the pages are all aspx and it's not easy.
I did manage to get the Irish channel Aertel done, so at least there is an English language one! I can post the details if anyone is interested?

JohnLF 2010-03-30 09:53

Re: Dexter - Text-TV Reader
 
Quote:

Originally Posted by pillar (Post 587850)
Concerning the name being not centered, I have no idea. Anyone? I'll fix it if someone can tell me what's causing it!

By any chance, did you pad the name with trailing spaces when you packaged it?
I must admit I never noticed it before now!

fgs 2010-03-30 13:41

Re: Dexter - Text-TV Reader
 
I just added to the Wiki page entries for BBC Ceefax1 and Ceefax2 services (United Kingdom).

Current limitation: for pages with multiple subpages, the URL of the first subpage is not correct. In the configuration file, parameters are
Code:

x\imageUrl=http://www.ceefax.tv/cgi-bin/gfx.cgi?page=[page]_0&font=big&channel=bbc1
x\subImageUrl=http://www.ceefax.tv/cgi-bin/gfx.cgi?page=[page]_[subpage]&font=big&channel=bbc1

If you insert the page number manually, the page URL will contain
Code:

page=[page]_0
but if the page has subpages it should be
Code:

page=[page]_1
How can this be fixed? In previous posts a page/subpage URL fallback mechanism was suggested. I think it would be helpful in this case.


All times are GMT. The time now is 05:45.

vBulletin® Version 3.8.8