Author Topic: Manual Uploading Custom Web Files  (Read 3424 times)

wurzelmac

  • Storm
  • *****
  • Posts: 1434
    • ITIROLPR2
    • Wetterstation Prägraten am Großvenediger
  • Station Details: Davis Vantage PRO2 Plus (24h fan aspirated, wireless) with UV/Solar | Weather Envoy Data Logger | Mac mini 2023 M2 8/256 | 1x Canon EOS 1100D | macOS Sonoma 15.0.1 | WC v330b300
Manual Uploading Custom Web Files
« on: October 26, 2015, 02:16:12 PM »
How about an additional entry in Tools: Upload Custom Web Now (similar to Update Weather Now)?

If I change anything in my WeatherCat controlled Website (Custom Web) I have to wait for the next scheduled upload or quit and restart WC if I do not want to wait (in my case) 15 minutes to see how the changes take affect.

Test Web Pages Locally is not a good alternative, because it clutters the screen, opens up apps like TextWrangler and TextEdit and opens every single WC-created page in a new browser tab. Apart of this no CSS structures are recognized.

Cheers,
Reinhard
Reinhard


awilltx

  • Guest
Re: Manual Uploading Custom Web Files
« Reply #1 on: October 26, 2015, 03:23:35 PM »
That would definitely come in handy from time to time!


Alan

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6663
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
This Applescript does that. (Re: Manual Uploading Custom Web Files)
« Reply #2 on: October 26, 2015, 07:55:32 PM »
Dear Reinhard, Alan, and WeatherCat web spinners,

How about an additional entry in Tools: Upload Custom Web Now (similar to Update Weather Now)?

This isn't as convenient but close.  Run this tiny AppleScript and it will cause WeatherCat to upload on the next weather sync.  Here is the code:

Code: [Select]
-- Force processing of WeatherCat custom web.
--
-- Running this script will cause WeatherCat to immediately
-- process custom web templates and upload them to your
-- server

tell application "WeatherCat"
set RunCustomWeb to true
end tell

The AppleScript is also attached to this posting.  You should be able to just download it, decompress it, load it into the AppleScript editor, and finally run it.

If you do this a lot.  You might want to save it as an AppleScript application so that you can just double-click on it to cause WeatherCat to upload on the next data fetch.

Cheers, Edouard

awilltx

  • Guest
Re: Manual Uploading Custom Web Files
« Reply #3 on: October 26, 2015, 08:04:45 PM »
Thanks for the script, Edouard! I will keep it in the toolbox for sure.


Alan

WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2959
    • CW9739
    • IIBSTO2
    • Trixology
  • Station Details: Main Station: Vantage Pro-2, 24hr fars, solar, extra temp stations, no U.V. WeatherLinkLive.
Re: Manual Uploading Custom Web Files
« Reply #4 on: October 31, 2015, 04:40:51 PM »
Added, thanks for the suggestion  [tup]