maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [QSportsEvent] FIFA World Cup and Football App (https://talk.maemo.org/showthread.php?t=49508)

Reflektorfalke 2010-04-17 12:26

Re: FIFA World Cup App ?
 
Quote:

Originally Posted by robbie (Post 614646)
You also can parse the soccerdb data to create a 'csv file' that you can use in a qt component. It shouldn't be that hard.

Just take a look here: http://www.aragon.ws/soccerdb/getmatches.php?id=714

From a non developer-view:
The flexibility and ability to design the layout seems pretty limited with the gettable/match.php method. E. g. I have no idea how logo´s can be implemented into this view!?

Doesn´t Robbies approach of "loading, storing and reusing" the data provide more flexibility - feature and layout wise?

magnuslu 2010-04-17 12:29

Re: FIFA World Cup App ?
 
Quote:

Originally Posted by Reflektorfalke (Post 614012)
Well, I am NOT a skilled graphic designer, but here is a draft of a background I created with my basic Photoshop knowledge...as well as a mockup to give you an impression how it looks within the app...

Please let me know what you think - ideas and suggestions very welcome :D

Actually, I have yet to include the background in my app, but when I do, I might need a separate one for portrait mode. Possible?

xavi6 2010-04-17 12:32

Re: FIFA World Cup App ?
 
Quote:

Originally Posted by Reflektorfalke (Post 601325)
Ok, guess this was a stupid idea...
considering all the coding and testing work for an app that is useless after just 4 weeks ;-)

BUT:

The more I think about it, the more I realize how much I miss an app for tracking football results of the major national leagues as well as Champions League...

This is really a must have for me!

Who else wants to have a football app?

absolutely ;)

magnuslu 2010-04-17 12:34

Re: FIFA World Cup App ?
 
Quote:

Originally Posted by Reflektorfalke (Post 614661)
From a non developer-view:
The flexibility and ability to design the layout seems pretty limited with the gettable/match.php method. E. g. I have no idea how logo´s can be implemented into this view!?

Doesn´t Robbies approach of "loading, storing and reusing" the data provide more flexibility - feature and layout wise?

Yes. once I get that far I'll compare what is best; to parse the HTML data or to download the .ts formatted league files. To some extent it depends on how updated the data in the .ts is and how big a download they are.

magnuslu 2010-04-17 12:43

Re: FIFA World Cup App ?
 
Some more icon requests...

I need some small (I have to find out the exact size requirements) icons to use as the tab headings. They should be simple. The headings I have now are:

Select (a check box maybe)
Favourites (stealing the fav icons from Firefox? or add a star to the select icon?)
Matches (some minuscule text ___ - ___ 1-1?)
Table (similar to matches)
News (rss icon or something 'newspaper like'?)
Update scores (same as matches but with a + sign?)
Might need more, but that's all for now.

Reflektorfalke 2010-04-17 12:46

Re: FIFA World Cup App ?
 
1 Attachment(s)
Quote:

Originally Posted by magnuslu (Post 614662)
Actually, I have yet to include the background in my app, but when I do, I might need a separate one for portrait mode. Possible?

Well this was meant to be a first draft for further work by and based on the community.

But of course, here is a portrait mode version.

robbie 2010-04-17 13:09

Re: FIFA World Cup App ?
 
The soccerdb parsing can be done online so it's always up-to-date.

Here's a php script that parses the data and puts it a simple format.

demo is at: http://gnista.xs4all.nl/soccerdb/results.php

Code:

<?php
    $url = 'http://www.aragon.ws/soccerdb/getmatches.php?id=714';

    function get_web_page( $url ) {
        $options = array(
            CURLOPT_RETURNTRANSFER => true,    // return web page
            CURLOPT_HEADER        => false,    // don't return headers
            CURLOPT_FOLLOWLOCATION => true,    // follow redirects
            CURLOPT_ENCODING      => "",      // handle compressed
            CURLOPT_USERAGENT      => "spider", // who am i
            CURLOPT_AUTOREFERER    => true,    // set referer on redirect
            CURLOPT_CONNECTTIMEOUT => 120,      // timeout on connect
            CURLOPT_TIMEOUT        => 120,      // timeout on response
            CURLOPT_MAXREDIRS      => 10,      // stop after 10 redirects
        );

        $ch      = curl_init( $url );
        curl_setopt_array( $ch, $options );
        $content = curl_exec( $ch );
        $err    = curl_errno( $ch );
        $errmsg  = curl_error( $ch );
        $header  = curl_getinfo( $ch );
        curl_close( $ch );

        $header['errno']  = $err;
        $header['errmsg']  = $errmsg;
        $header['content'] = $content;
        return $header;
    }

    $rawdata = get_web_page($url);
    $content = $rawdata['content'];

    $content = str_replace("document.write('", '', $content);
    $content = str_replace("');", '', $content);
    $content = str_replace(chr(10), '', $content);
    $content = str_replace(chr(13), '', $content);
    $content = str_replace('</td>', '|', $content);
    $content = str_replace('</tr>', '#', $content);
    $content = str_replace('&nbsp;','',$content);
    $content = strip_tags($content);
   
    $rows =explode('#',$content);
    $result = Array();
    foreach ($rows as $row) {
        $columns = explode('|',$row);
        if (count($columns) == 2) {
            echo 'date:' . trim($columns[0]) .chr(13).chr(10);
        }
        if (count($columns) == 7) {
            echo trim($columns[0]) . '|' . trim($columns[2]) . '|' . trim($columns[3]) . '|' . trim($columns[5]) .chr(13).chr(10);
        }
    }
?>


magnuslu 2010-04-17 13:23

Re: FIFA World Cup App ?
 
Quote:

Originally Posted by robbie (Post 614714)
The soccerdb parsing can be done online so it's always up-to-date.

Here's a php script that parses the data and puts it a simple format.

demo is at: http://gnista.xs4all.nl/soccerdb/results.php

Thanks for adding another option. I'm only a bit worried to add dependency on yet another site as it adds another point of failure. As it already is, if SoccerDB is down, QSportsEvent is toasted as well...

Reflektorfalke 2010-04-17 13:26

Re: FIFA World Cup App ?
 
5 Attachment(s)
Quote:

Originally Posted by magnuslu (Post 614678)
Some more icon requests...

Select (a check box maybe)
Favourites (stealing the fav icons from Firefox? or add a star to the select icon?)
Matches (some minuscule text ___ - ___ 1-1?)
Table (similar to matches)
News (rss icon or something 'newspaper like'?)
Update scores (same as matches but with a + sign?)
Might need more, but that's all for now.

As ordered the icons for the menu (size is 32x32px by now).

1. Select
2. Favourites
3. Matches
4. Table
5. News

Reflektorfalke 2010-04-17 13:27

Re: FIFA World Cup App ?
 
1 Attachment(s)
And

6. Update scores


All times are GMT. The time now is 11:47.

vBulletin® Version 3.8.8