NOAA RSS Feeds
Posted: Sat 17 Aug 2013 2:16 pm
I don't think that this has anything to do with the other NOAA reports thread, correct me if I am wrong.
I added a section on tropical cyclones a little while back (not that we experience many in Bulgaria but I wanted to pad the site out a bit).
To pad it out even more, I thought I would incorporate relevant RSS feeds from NOAA.
Whoa! (Virtually) fully upper case and <pre> code. Frankly it is crap.
I am sure that they have a good reason for doing it in that format but isn't there some other more suitable format?
I have tidied it up a lot (at least, to fit to my page width, as opposed to 1/2 a page) but, the most annoying thing for me is that it is still in upper case. I have looked at several upper>title case javascript conversions and tried a couple but neither of those did a good job (anything all caps remains; so small words like as,is,an,the,etc. get changed but the more relevant words don't and if a sentence begins with "an", for example, it has a lower case initial letter). So, I have abandoned those.
Anyway, they are title case and I want sentence case. I did come across one or two online conversions and reference to a PHP solution but it only provided components of the code not the full thing. Also, it was based on pspell and I understand that has been deprecated in favor of enchant.
If you're interested, you can see what I have done so far at http://www.jerbils.info/saratoga/wxhurricanesNA.php (below the wunderground map (I use them for W. Pacific & Indian Ocean feeds because NOAA doesn't provide)).
So, if I am in fact using feeds intended for some other purpose and there are better ones out there, please let me know. Alternatively, if anyone knows of an intelligent (e.g. with user modifiable dictionary) drop-in solution for converting upper case text to sentence case, please let me know.
I added a section on tropical cyclones a little while back (not that we experience many in Bulgaria but I wanted to pad the site out a bit).
To pad it out even more, I thought I would incorporate relevant RSS feeds from NOAA.
Whoa! (Virtually) fully upper case and <pre> code. Frankly it is crap.
I am sure that they have a good reason for doing it in that format but isn't there some other more suitable format?
I have tidied it up a lot (at least, to fit to my page width, as opposed to 1/2 a page) but, the most annoying thing for me is that it is still in upper case. I have looked at several upper>title case javascript conversions and tried a couple but neither of those did a good job (anything all caps remains; so small words like as,is,an,the,etc. get changed but the more relevant words don't and if a sentence begins with "an", for example, it has a lower case initial letter). So, I have abandoned those.
Anyway, they are title case and I want sentence case. I did come across one or two online conversions and reference to a PHP solution but it only provided components of the code not the full thing. Also, it was based on pspell and I understand that has been deprecated in favor of enchant.
If you're interested, you can see what I have done so far at http://www.jerbils.info/saratoga/wxhurricanesNA.php (below the wunderground map (I use them for W. Pacific & Indian Ocean feeds because NOAA doesn't provide)).
So, if I am in fact using feeds intended for some other purpose and there are better ones out there, please let me know. Alternatively, if anyone knows of an intelligent (e.g. with user modifiable dictionary) drop-in solution for converting upper case text to sentence case, please let me know.