Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Dev

Q: mythweather: character encoding

 

 

MythTV dev RSS feed   Index | Next | Previous | View Threaded


leamas.alec at gmail

Mar 28, 2010, 3:46 AM

Post #1 of 6 (1046 views)
Permalink
Q: mythweather: character encoding

I've been trying to create a mythweather grabber which covers parts of
Europe where I live. Doing so, i sometimes get descriptions of places in
non-ascii character sets when I do a search. So, I need to deliver
search results with 8-bit data to myth through the interface between the
mythweather grabber and the main program.

I'm on 022-fixes.

Through trial and error I have made it work using latin-1 encoded data
sent from grabber to myth. Although it works, it seems strange: as I
understand it both the platform (Fedora 12) and myth uses utf8(?) And
all people does not use latin-1, for sure.

My question is how to handle this. Is there a way to find out which
character encoding myth actually expects, perhaps some setting? Or is
this just plain wrong, should myth be patched to handle the platform,
usually utf8 encoding when interpreting the data from the grabber? Or am
I just missing something simple?

Thx in advance...

Cheers!

--alec
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


gjhurlbu at gmail

Mar 28, 2010, 7:34 AM

Post #2 of 6 (1014 views)
Permalink
Re: Q: mythweather: character encoding [In reply to]

On Sun, Mar 28, 2010 at 6:46 AM, Alec Leamas <leamas.alec [at] gmail> wrote:
> I've been trying to create a mythweather grabber which covers parts of
> Europe where I live. Doing so, i sometimes get descriptions of places in
> non-ascii character sets when I do a search. So, I need to deliver search
> results with 8-bit data to myth through the interface between the
> mythweather grabber and the main program.

I have a grabber ready to be committed for trunk (after 0.23 is
official) that uses yr.no, which covers pretty much the entire world.
I am using UTF-8, and still need to double-check it with accented
characters. If mythweather does not accept UTF-8 right now, it will
very soon.

Also, please be sure to ensure that any grabber you create adheres to
the terms of service for the data provider. If it doesn't, it most
certainly will not be accepted into the repository. Just a heads up.
:)

Ciao
Gavin
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


jonathan at snetram

Mar 28, 2010, 9:40 AM

Post #3 of 6 (1012 views)
Permalink
Re: Q: mythweather: character encoding [In reply to]

On 28-3-2010 16:34, Gavin Hurlbut wrote:
> I have a grabber ready to be committed for trunk (after 0.23 is
> official) that uses yr.no, which covers pretty much the entire world.

[...]

> Also, please be sure to ensure that any grabber you create adheres to
> the terms of service for the data provider. If it doesn't, it most
> certainly will not be accepted into the repository. Just a heads up.

The latter might be the case for your grabber as well as according to
http://www.yr.no/verdata/1.6810075 usage is only allowed from Norway. I
am not sure if that will pass the criteria to be committed to the
repository as well.

Kind regards,

Jonathan
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


gjhurlbu at gmail

Mar 28, 2010, 10:29 AM

Post #4 of 6 (1000 views)
Permalink
Re: Q: mythweather: character encoding [In reply to]

On Sun, Mar 28, 2010 at 12:40 PM, Jonathan Martens <jonathan [at] snetram> wrote:
> On 28-3-2010 16:34, Gavin Hurlbut wrote:
>>
>> I have a grabber ready to be committed for trunk (after 0.23 is
>> official) that uses yr.no, which covers pretty much the entire world.
>
> [...]
>
>> Also, please be sure to ensure that any grabber you create adheres to
>> the terms of service for the data provider.  If it doesn't, it most
>> certainly will not be accepted into the repository.  Just a heads up.
>
> The latter might be the case for your grabber as well as according to
> http://www.yr.no/verdata/1.6810075 usage is only allowed from Norway. I am
> not sure if that will pass the criteria to be committed to the repository as
> well.

That is not true.

yr.no says they are primarily doing it for Norway and aren't
encouraging outside use, but do not preclude it. Read carefully. I
have had several Norwegians translate the ToS for me, and none of the
translations say it is only available in Norway, nor does the link you
gave.

Sorry to disappoint you ;)
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


leamas.alec at gmail

Mar 29, 2010, 10:40 AM

Post #5 of 6 (973 views)
Permalink
Re: Q: mythweather: character encoding [In reply to]

On 03/28/2010 07:29 PM, Gavin Hurlbut wrote:
> On Sun, Mar 28, 2010 at 12:40 PM, Jonathan Martens<jonathan [at] snetram> wrote:
>
>> On 28-3-2010 16:34, Gavin Hurlbut wrote:
>>
>>> I have a grabber ready to be committed for trunk (after 0.23 is
>>> official) that uses yr.no, which covers pretty much the entire world.
>>>
>> [...]
>>
>>
>>> Also, please be sure to ensure that any grabber you create adheres to
>>> the terms of service for the data provider. If it doesn't, it most
>>> certainly will not be accepted into the repository. Just a heads up.
>>>
>> The latter might be the case for your grabber as well as according to
>> http://www.yr.no/verdata/1.6810075 usage is only allowed from Norway. I am
>> not sure if that will pass the criteria to be committed to the repository as
>> well.
>>
> That is not true.
>
> yr.no says they are primarily doing it for Norway and aren't
> encouraging outside use, but do not preclude it. Read carefully. I
> have had several Norwegians translate the ToS for me, and none of the
> translations say it is only available in Norway, nor does the link you
> gave.
>
> Sorry to disappoint you ;)
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>

I have also been playing with yr.no, and it's really temtping to use
this site: good forecasts for large parts of the world, and liberal ToS.
But there is also problems:

- It *is* ok to use the site from outside Norway (I'm Swede, and have
read the page). However, the ToS requires that a 93 character long
promotion text is displayed in the same font as other text on the
screen. This is not possible today, at least not in 0.22. The forecast
windows doesn't even has a copyright field, and it's anyway hard to fit
93 characters. The only way I can think of is some kind of stock ticker.

- The forecasts from yr.no doesn't include the probability of
precipitation (pop) parameter. Instead, it gives the anticipated amount
of precipitation for the period (in mm). IMHO mythweather should be
able to display this instead of pop in this situation, but this needs
some work.

Unless anyone think its a bad idea, I'm about to file bugs against
mythweather for these things.


_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


gjhurlbu at gmail

Mar 29, 2010, 8:50 PM

Post #6 of 6 (967 views)
Permalink
Re: Q: mythweather: character encoding [In reply to]

On Mon, Mar 29, 2010 at 1:40 PM, Alec Leamas <leamas.alec [at] gmail> wrote:
> - It *is* ok to use the site from outside Norway (I'm Swede, and have read
> the page). However, the ToS requires that a 93 character long promotion text
> is displayed in the same font as other text on the screen. This is not
> possible today, at least not in 0.22. The forecast windows doesn't even has
> a copyright field, and it's anyway hard to fit 93 characters. The only way I
> can think of is some kind of stock ticker.

I will leave this to the themers to figure out. With the changes I
have set to go for mythweather post 0.23 release, the copyright will
be available for every screen. Also UTF-8 should work.

> - The forecasts from yr.no doesn't include the probability of precipitation
> (pop) parameter. Instead, it gives the anticipated amount of precipitation
> for the period (in mm). IMHO  mythweather should be able to display this
> instead of pop in this situation, but this needs some work.

For now, the yr.no script will put N/A for POP. I considered the
amount of precipitation, but that can be after, it's not hard to
modify. My script is completed and ready to be used once 0.23 has
been released. It will require the copyright changes in the themes to
be really allowable under ToS though.

> Unless anyone think its a bad idea, I'm about to file bugs against
> mythweather for these things.

Thanks for posting the copyright-related bug. I was going to do it,
but you beat me to it. I was busy tweaking mythweather and my scripts
:)
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

MythTV dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.