Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 01-08-2017, 02:25   #886
Registered User

Join Date: Mar 2017
Location: Brittany, France
Boat: First 18
Posts: 323
Re: Singapore website wildcard needed

Quote:
Originally Posted by rgleason View Post
In order to get the singapore site working we need some kind of http wildcard, which is not possible.
This should be doable by introducing strftime-like formatting in the URLs. This requires some coding but it should be quite easy...

Stelian.
stelian is offline   Reply With Quote
Old 01-08-2017, 13:30   #887
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: WeatherFax ...

Strftime coding? Is it done in the html? I guess I should do a search. Thanks.

---
EG filename: surfacewinds_24Hr_20170731_213000.gif

Strftime coding: surfacewinds_24hr_%Y%m%d_[unknown].gif

Why can't we do somehthing with wildcard searches? surfacewinds_24hr_*_*.gif

I think I need a URL example that works, or must this be a python or PHP script that the program calls somehow? This is getting to sophisticated for me I think.

I had to use this to make sequential backups with year/month/day. Here we already have the some unknown program making the year month day_ ????.gif and we need a wildcard. I really think so, how else would it work? Otherwise we have to "know" exactly what file name is posted at a given date and time!
rgleason is offline   Reply With Quote
Old 01-08-2017, 14:06   #888
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: WeatherFax ...

Thanks, Stelian. This is the best way to do it, IMHO! Nice and clear.
Did those changes and also added some and fixed some that had the wrong times (24hr). Also removed the "_fullsize" because they have an identical set that is smaller, so downloads are faster.

Quote:
Originally Posted by stelian View Post
I've found another error in the weathercharts.org URLs: one of the prognosis charts was missing.

Find attached a new version (edited, including only weathercharts.org data)
rgleason is offline   Reply With Quote
Old 01-08-2017, 16:15   #889
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Weatherfax - XML Review - AUS, Singapore, India need work.

I've just about done all that I can do now.

The AUS Met site has changed significantly and is using dates in their image files. I've left the newer more productive links pasted into the weatherfaxinternetretrieval file but commented out, so that someone can make this section work better. It needs a major update.

I've gotten some of the main links going for AUS but many are dead.

Singapore MET is a similar problem using dates. I've left commented out links that are good. This needs work too.

India is a similar problem. I've pasted the best of those new links into this thread. Someone who uses those will have to pull them all together.

With that summary, I am going to pull the files together, zip and upload here, and then make a pull request and a request for update to the downloads.

I hope some people will take on AUS, Singapore and India. At least these are defined extent, but they need to be redone I think with some new techniques, to get the right images.
rgleason is offline   Reply With Quote
Old 01-08-2017, 19:35   #890
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Wink XML Weatherfax UPDATE

Attached are the XML files. Please remove the pdf and unzip. Then copy then to the proper locations in your file system.

For Windows:
Copy:
weatherfaxinternetretrieval.xml
coordinatesets.xml
To:
C:\Program Files (x86)\OpenCPN 4.6.2\plugins\weatherfax_pi\data

Copy:
coordinatesets.xml
To:
C:\ProgramData\opencpn\plugins\weatherfax

Linux is a little different depending on the flavor. Do searches to understand where.
Attached Files
File Type: pdf Weatherfax-XML-08-01-2017.zip.pdf (20.0 KB, 39 views)
rgleason is offline   Reply With Quote
Old 02-08-2017, 15:01   #891
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Sean PR: XML Update - Pull Request

Have made a Pull Request for Sean for XML Updates (2 files)

Sean can you please merge this Pull Request so Bdbcat can update the download?

The Entire World was checked, Some URL need more work due to the use of PHP and scripts that make URL's with changing numbers and dates.

UK Met
France Met
Australia Bon
Singapore Met
India Met
Japanse Met

There will be a python file to download one of these URL. Can it be used with weatherfax?
rgleason is offline   Reply With Quote
Old 03-08-2017, 04:00   #892
LJH
Registered User

Join Date: Mar 2012
Location: Nova Scotia
Boat: Wauquiez Centurion 42
Posts: 275
Re: WeatherFax ...

Quote:
Originally Posted by rgleason View Post
Strftime coding? Is it done in the html? I guess I should do a search. Thanks.

---
EG filename: surfacewinds_24Hr_20170731_213000.gif

Strftime coding: surfacewinds_24hr_%Y%m%d_[unknown].gif

Why can't we do somehthing with wildcard searches? surfacewinds_24hr_*_*.gif

I think I need a URL example that works, or must this be a python or PHP script that the program calls somehow? This is getting to sophisticated for me I think.

I had to use this to make sequential backups with year/month/day. Here we already have the some unknown program making the year month day_ ????.gif and we need a wildcard. I really think so, how else would it work? Otherwise we have to "know" exactly what file name is posted at a given date and time!
The ???? is probably %H%M%S (21:30:00). We need to figure out how often they are published and if they are consistent with the file name. Then it would be a matter calculating the the time to use for the file name based on system time.
LJH is offline   Reply With Quote
Old 04-08-2017, 02:56   #893
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: WeatherFax ...

Ok, if we can figure out the times used, then we need the plugin to cycle in the correct time code, rewriting the time cycle information we provide in some predetermined format.

I am not sure the plugin does this yet. There are some variables used which are used to repeat requests so this can be done I think.
rgleason is offline   Reply With Quote
Old 04-08-2017, 03:03   #894
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: WeatherFax ...

The example surfacewinds_24hr_20170731_213000.gif is then
Surfacewinds_24hr_%Y%m%d_%H%M%S.gif. but we do not want the colons!
rgleason is offline   Reply With Quote
Old 05-08-2017, 03:17   #895
LJH
Registered User

Join Date: Mar 2012
Location: Nova Scotia
Boat: Wauquiez Centurion 42
Posts: 275
Re: Sean PR: XML Update - Pull Request

Quote:
Originally Posted by rgleason View Post
Have made a Pull Request for Sean for XML Updates (2 files)

Sean can you please merge this Pull Request so Bdbcat can update the download?

The Entire World was checked, Some URL need more work due to the use of PHP and scripts that make URL's with changing numbers and dates.

UK Met
France Met
Australia Bon
Singapore Met
India Met
Japanse Met

There will be a python file to download one of these URL. Can it be used with weatherfax?

Australia has an FTP site that appears to contain all of their products, but it does not appear to have an index. I will put together a catalog for you.
LJH is offline   Reply With Quote
Old 05-08-2017, 19:38   #896
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: WeatherFax ...

Great, That would really help, FTP and a listing of all URLs you want with the Text description.

I hope they don't use the darn srtftime coding at the end.
At least NOAA puts their times at the very end with a "?" so all we do is drop the date and time and the "?" to get a URL that works.
rgleason is offline   Reply With Quote
Old 09-08-2017, 04:10   #897
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: WeatherFax ...

Guys, I suggest that if you like this plugin and use it, you should send Sean a paypal donation. It would certainly help keep the code maintained!
rgleason is offline   Reply With Quote
Old 09-08-2017, 05:38   #898
Registered User

Join Date: Mar 2017
Location: Brittany, France
Boat: First 18
Posts: 323
Re: WeatherFax ...

Had a few spare minutes, so I implemented the strftime coding.

From the commit log:

Code:
Implement strftime-like formatting in fax URLs     

This can be used to download faxes where the date of the fax is encoded into the 
URL (like surfacewinds_24hr_20170731_213000.gif).

All the standard strftime special sequences are supported, and the <Map> XML tag
can contain the DateOffset attribute in order to specify an offset (in days) to be
added/substracted to the current date.

For example:
   <Server Name="test" Url="http://www.test.net/">
     <Region Name="test">
       <Map Url="%Y%m%d.html" Contents="today" Area="1" />
       <Map Url="%Y%m%d.html" DateOffset="-1" Contents="yesterday" Area="1" />
       <Map Url="%Y%m%d.html" DateOffset="+1" Contents="tomorrow" Area="1" />
       <Area Name="1" lat1="40N" lat2="70N" lon1="50W" lon2="50E" />
     </Region>
   </Server>
The code is here:
https://github.com/stelian42/weather...f1abb094d0ad46

If this is OK for everybody I'll submit a pull request to Sean.
stelian is offline   Reply With Quote
Old 09-08-2017, 06:56   #899
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: WeatherFax ...

Stelian, this is a wonderful addiition. I will be able to dwnld and test it after aug 22, will try earlier than that.

Perhaps someone else can compile and verify before me?

If this works we can add many more Met urls!
rgleason is offline   Reply With Quote
Old 11-08-2017, 06:59   #900
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: WeatherFax ...

In thinking about how to use this new feature, I realize we need to know the exact timing and date code for each url and be able to calculate the exact url within the plugin. This would mean the xml file format would have to support this type of information too, so it can be interpreted by the program. Is this what is happening?

I think we need some examples on how to use it.
rgleason is offline   Reply With Quote
Reply

Tags
paracelle


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
For Sale: SSB, Tuner, Amp, WeatherFax Palarran Classifieds Archive 7 19-03-2011 07:22
Help with WeatherFax and SeaTTY desierto Navigation 2 12-12-2008 20:36
Basic Weatherfax reception Tnflakbait Marine Electronics 3 23-09-2008 21:55
How do I set myself up with weatherfax? tracker_46 Marine Electronics 4 12-10-2006 14:51
Weatherfax Recommendations Please Salacia Marine Electronics 3 03-07-2005 13:28

Advertise Here


All times are GMT -7. The time now is 17:34.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.