Author Topic: Multiple Web Site Updating Possible?  (Read 8933 times)

KeithC

  • Strong Breeze
  • ***
  • Posts: 118
    • Denton Rainfall
  • Station Details: Vantage Pro2 (daytime FARS) w/ Macbook OS 10.9.2
Multiple Web Site Updating Possible?
« on: April 27, 2013, 08:21:50 PM »
My first post - hi everyone!

Does anyone have any clever ideas for enabling WeatherCat to update current weather conditions for more than one custom web site (different domain names) - perhaps any combination of ajax and php, for instance? Even though I'm a beginner in Javascript and PHP, I can get it done if someone can point me down the right road.

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6686
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Automated FTP client? (Re: Multiple Web Site Updating Possible?)
« Reply #1 on: April 27, 2013, 09:05:40 PM »
Hi Keith,

First, Welcome to the WeatherCat forum!

If you want to upload files to more than one domain, one trick that ought to work is to have WeatherCat generate all the files for all the sites using its normal technique allow WeatherCat to upload all the files to one of the domains.  It would waste a little bandwidth and space.  It would depend exactly how much you are uploading.

Then you should one of these more advanced FTP clients that have automation features to automatically upload the files for the other domains.  Simply have the FTP client upload the file list you have selected from the same directory that WeatherCat uses to store the files it has generated from the templates before uploading.

Cheers, Edouard  [cheers1]

KeithC

  • Strong Breeze
  • ***
  • Posts: 118
    • Denton Rainfall
  • Station Details: Vantage Pro2 (daytime FARS) w/ Macbook OS 10.9.2
Re: Multiple Web Site Updating Possible?
« Reply #2 on: April 27, 2013, 10:26:15 PM »
I'm liking that idea a lot. Thanks Edouard, you are a Titan! I didn't know FTP clients existed that could upload automatically, but that opens the door for the task at hand. I'll look into that right now. And I'll post an update later for anyone interested to see if this works; this might very well be Googled up some day.

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6686
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Yummy FTP "syncs" (Re: Multiple Web Site Updating)
« Reply #3 on: April 27, 2013, 11:03:52 PM »
Hi Keith,

I'm liking that idea a lot. Thanks Edouard, you are a Titan! I didn't know FTP clients existed that could upload automatically, but that opens the door for the task at hand.

Check a shareware site like MacUpdate.com for some of your choices.  One way to make this work is to use the client I use: Yummy FTP.

http://www.yummysoftware.com/

It can keep directories synchronized periodically.  If you simply have the syncs happen from your Mac to your remote sites and set the period to your needs, that would work.

I believe there are more sophisticated FTP clients out there and even Yummy FTP may have better ways to implementing this than I saw.  I just made a quick pass to see what was possible.

You could even write a UNIX shell script run periodically as a cron job that would do all of this for free.  You would need to be comfortable with that sort of thing though.   Still, with a little Google searches, you might find what you need just laying around.

Cheers, Edouard  [cheers1]

KeithC

  • Strong Breeze
  • ***
  • Posts: 118
    • Denton Rainfall
  • Station Details: Vantage Pro2 (daytime FARS) w/ Macbook OS 10.9.2
Re: Multiple Web Site Updating Possible?
« Reply #4 on: April 28, 2013, 12:35:11 AM »
Yes, I saw YummyFTP in my recent search. That sounds like the best one yet, but I can't tell from its description what uploading intervals it allows. Does it allow for intervals of 1 minute, or less, for instance? So far YummyFTP looks best - if I knew what intervals it offers.

Also, I'm not sure I know exactly what syncing is all about. Does that mean uploading to different directories simultaneously on multiple threads?

Shell stuff is not in my comfort zone. I've only used Terminal for compiling some Java programs and running them. That's about it. But thanks for the heads up on that.

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6686
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Yummy FTP can do 1 minute (Re: Multiple Web Site Updating)
« Reply #5 on: April 28, 2013, 09:58:18 PM »
Hi Keith and WeatherCat tinkers,

Yes, I saw YummyFTP in my recent search. That sounds like the best one yet, but I can't tell from its description what uploading intervals it allows. Does it allow for intervals of 1 minute, or less, for instance? So far YummyFTP looks best - if I knew what intervals it offers.

I just checked, Yummy FTP can do as fast as once a minute.

Also, I'm not sure I know exactly what syncing is all about. Does that mean uploading to different directories simultaneously on multiple threads?

Sync is for files what keeping your calendars on your Mac, iPhone, iPad, etc. is all about.  Yummy FTP would make sure that the files are your remote server correspond to the files on your local Mac.  Each sampling interval (say one minute,) Yummy FTP would check the time-stamps on the files on the remote server, if the files on your mac were more recent than those remote files, it would FTP the newer files over.  That way the remote server is reasonably close to a copy of your Mac with regards to the particular folder you select to keep in sync.

The instructions for Yummy FTP are a little sketchy and I didn't actually try it, but it should work.  There appears to be decent support for Yummy FTP so you could just send an email to the developer and see if what I suggest would work as claimed.

Cheers, Edouard  [cheers1]

KeithC

  • Strong Breeze
  • ***
  • Posts: 118
    • Denton Rainfall
  • Station Details: Vantage Pro2 (daytime FARS) w/ Macbook OS 10.9.2
Re: Multiple Web Site Updating Possible?
« Reply #6 on: April 28, 2013, 11:26:16 PM »
This is certainly the road I asked to be pointed down. Thank you very much! From the ideas you've suggested I'm feeling pretty good about being able to update multiple sites with my weather data.

I'm curious though: why does WeatherCat have the ability to update NOAA, C.W.O.P., etc., along with my custom site, and yet WeatherCat is unable to update multiple sites of my own? It seems to me that one should only have to re-point the uploads to the weather reporting sites to go to my own sites. Shows you what I know :-D

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6686
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Nobody asked! (Re: Multiple Web Site Updating Possible?)
« Reply #7 on: April 29, 2013, 10:20:26 PM »
Dear Keith and WeatherCat fans,

I'm curious though: why does WeatherCat have the ability to update NOAA, C.W.O.P., etc., along with my custom site, and yet WeatherCat is unable to update multiple sites of my own? It seems to me that one should only have to re-point the uploads to the weather reporting sites to go to my own sites. Shows you what I know :-D

Honestly I believe the reason is quite simply nobody has ever asked for that feature.  If you think it is important you certainly can be the first!

http://athena.trixology.com/index.php?board=4.0

As far as I know there isn't any particularly interesting use of that sort of capability for the sort of hobbyists that are the most common WeatherCat user.  I suspect there is some hassle associated in having multiple FTP info and specially passwords securely stored.  If there isn't enough interest you may need to cobble something together as suggested.  Because there are so many ways to do this (including Automator by the way) there is certainly means to accomplish what you want even if it doesn't get into WeatherCat.

Cheers, Edouard  [cheers1]

KeithC

  • Strong Breeze
  • ***
  • Posts: 118
    • Denton Rainfall
  • Station Details: Vantage Pro2 (daytime FARS) w/ Macbook OS 10.9.2
Re: Multiple Web Site Updating Possible?
« Reply #8 on: April 29, 2013, 11:27:05 PM »
I agree a thousand percent.

I failed, however, to word my question correctly. I was wondering why WeatherCat can send our data to multiple sites at once UNLESS they are sites that we, personally, own. Not important at all, though.

Frankly, there is no market for that other than me, I know. And just for the record, I wasn't complaining at all about WeatherCat either; It's truly impressive.

KeithC

  • Strong Breeze
  • ***
  • Posts: 118
    • Denton Rainfall
  • Station Details: Vantage Pro2 (daytime FARS) w/ Macbook OS 10.9.2
Re: Multiple Web Site Updating Possible?
« Reply #9 on: April 30, 2013, 01:18:35 AM »
I hope no one thinks I'm criticizing WeatherCat, because I'm not in the least bit. In fact, I'm absolutely sure that the answer to my question is well-founded. I was just wondering out loud...

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6686
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Really not for amateurs (Re: Multiple Web Site Updating Possible?)
« Reply #10 on: May 01, 2013, 12:00:07 AM »
Hi Keith and WeatherCat fans,

I was wondering why WeatherCat can send our data to multiple sites at once UNLESS they are sites that we, personally, own. Not important at all, though.

Right now there is very little reason for it because most of us are amateurs.  However, it could change either if WeatherCat gained use by academic, government, or business users, or some service out there required data to be uploaded via FTP.

I think the likelihood of a service going the FTP route isn't likely.  Instead they are more likely to copy Weather Underground and use HTTP.  I could imagine that someone could use WeatherCat in some sort of corporate setting and want to upload to multiple sites.  Still, there are ways around it.  You could upload to one server and then run server-side scripts to move the files to other servers. 

I think what it really boils down to is that anyone sophisticated enough to really need to deal with more than one website server can come up with really effective ways to handle the problem without adding the complexity to WeatherCat.  The rest of us have our hands full with just one website!

Cheers, Edouard  [cheers1]

KeithC

  • Strong Breeze
  • ***
  • Posts: 118
    • Denton Rainfall
  • Station Details: Vantage Pro2 (daytime FARS) w/ Macbook OS 10.9.2
Re: Multiple Web Site Updating Possible?
« Reply #11 on: May 01, 2013, 02:26:51 AM »
Hi Edouard.

You hit the nail on the head with the server side scripting. I'm leaning that way. The FTP is still a brilliant idea, though, and I might end up using it to some degree.

My 3 sites are not commercial. One is just for my weather-geek side - for my rain diary and new WeatherCat/Vantage data, and to play with code whenever I find a rare moments peace - which I love in an amateur sort of way. The other two are art sites that will soon incorporate current weather conditions into current art - whenever I solve this multi-site data-sharing dilemma - which I think I have.

The weather site is in the process of being WeatherCatted. Its raw form: http://dentonrainfall.com/

It will house the data that I will transfer to the other two sites via scripts - maybe even without a proxy because my sites sit on the same server. I think that will be the best way to get this done - and the most gratifying for a code newbie.

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6686
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
A little UNIX stuff may be needed (Re: Multiple Web Site Updating)
« Reply #12 on: May 01, 2013, 07:43:30 PM »
Hi Keith,

Even us amateurs can end up being quiet ambitious!

You hit the nail on the head with the server side scripting. I'm leaning that way. The FTP is still a brilliant idea, though, and I might end up using it to some degree.

. . . . . . . . . .

It will house the data that I will transfer to the other two sites via scripts - maybe even without a proxy because my sites sit on the same server. I think that will be the best way to get this done - and the most gratifying for a code newbie.

If this single server is either UNIX or OS-X, there are lots of UNIX based ways to do what you want.  A very simple shell script triggered by a cron job will move files around a server.  Yeah, I know  . . . . . .  UNIX has a steep learning curve, but start small and make simple experiments that you can easily observe working.  Not only will that probably make for a more satisfying solution but what you learn will probably serve you for years to come.

Cheers, Edouard  [cheers1]

KeithC

  • Strong Breeze
  • ***
  • Posts: 118
    • Denton Rainfall
  • Station Details: Vantage Pro2 (daytime FARS) w/ Macbook OS 10.9.2
Re: Multiple Web Site Updating Possible?
« Reply #13 on: May 01, 2013, 09:34:03 PM »
That's good to know, Edouard.

My sites are on a Linux server. Nevertheless, I'll learn how to speak cron in the not-so-distant-future so I can switch tactics if need be. At the moment I think that JQuery is going to get it done for me, and will be fairly simple to implement with my limited knowledge. I just enjoy the feeling of accomplishment when I finally get some issue like this resolved.

KeithC

  • Strong Breeze
  • ***
  • Posts: 118
    • Denton Rainfall
  • Station Details: Vantage Pro2 (daytime FARS) w/ Macbook OS 10.9.2
Re: Multiple Web Site Updating Possible?
« Reply #14 on: May 03, 2013, 08:13:44 PM »
Problem solved.

Hello Edouard and Fellow WeatherCatters. Here's how I did it:

First, as I sort of mentioned above, I moved my two other sites to the same server space as my third site (i.e. all under the same web host account. It's called "domain parking" - search engines and Internet surfers see all 3 sites as separate, stand-alone web sites, but the server sees differently. It sees 2 of the sites as folders within a main site, which now allows me to JQuery the WeatherCat uploads freely between sites instantly and easily. And yet all 3 sites have different domain names - like www.myhobby.com and www.myotherinterests.com and www.whateverelse.com.

There's other ways to get this done, I'm sure, but this suits me best.

Note to visitors from the future: Just make sure your total projected traffic for all sites involved is well within your server space bandwidth limit.