Author Topic: Basic stupid template operations  (Read 13985 times)

xairbusdriver

  • Storm
  • *****
  • Posts: 3126
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Basic stupid template operations
« on: April 22, 2015, 10:53:11 PM »
I've given up on the beautiful Steel Gauges and the very interesting Saratoga templates for the moment. I actually have been able to display the Steel Gauges on my web site, but I still haven't figured out where to put all the files so WC can update the info on them. I'll figure that out in due time; I'm starting over with the basics, following the WC User Manual (BTW, the one I have should be the newest, so my page numbers may not coincide with yours).

OK, page 102 discusses using the template written by Todd Atkins, it's included with the WC download. There are three steps on this page that are easy to follow, of course. However, by the time I get to the Prefs, I've made lots of changes, so I sneak a peak at the picture (on the next page) make sure I have the correct "Save Path" set.

The last step is to simply 'test locally'. WOW! I gave up counting the number of tabs Safari threw at me. A little investigation, however, revealed that the ~/Library/Application Support/WeatherCatCustomWeb directory had already been filled with maybe a hundred files; lots of images, but tons of html, css, js, etc. files. Safari attempted to display every single one of them. TextEdit also tried to help by opening all the .txt files. Even BBEdit got into the act by opening all the css, php, and html files.

I decided these were put into this directory with my earlier baseball bat approach and I removed everything other than the images. Ran the 'test local' again and now only the "wx.css" tab was added to the two (normal) Wx display pages for the Atkins template.

Those html files both show that css file in the head, which is normal (although I may move that to a folder and change the link a bit). Why Safari wants to display it, I don't know. I emptied its cache via the Develop Menu, but it still wants to display that file in a separate tab than the two Wx pages. Also, TextEdit opens the realtimegaugesWC.txt file. I may have that file in the wrong (or too many) place(s) after playing with the Steel Gauges WC Wiki. [banghead]

I've also changed the default browser to Firefox with somewhat different results:
  • Firefox understands to NOT display the css file. it simply shows the two html pages.
  • TextEdit still opens realtimegaugesWC.txt.
  • Safari opens, again, a single page displaying the wx.css file.

A regular Restart, after changing the default browser, made no difference. I may try a cold Start up...

Any clues as to:
  • Why the wx.css file is being displayed by Safari?
  • Why TextEdit is opening the realtimegaugesWC.txt?
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


xairbusdriver

  • Storm
  • *****
  • Posts: 3126
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: Basic stupid template operations
« Reply #1 on: April 22, 2015, 11:13:06 PM »
Slight update: I completely emptied the WeatherCatCustomWeb folder and hit the 'test locally' again.
First WC simply added the images that it needed, but the browser never opened.
I clicked the 'test locally' a second time. This time, WC probably updated the images, but it also added the wx.html and wxhistoric.html and the wx.css files.

Firefox then opened the two pages.
Safari still opened and displayed the wx.css file.
However, the realtimegaugesWC.txt file was not added nor did TextEdit open it. That file only resides in completely different directories from WC and the Atkins template. How is WC accessing it?!
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2911
    • CW9739
    • ISCOTLAN25
    • Trixology
  • Station Details: Main Station: Vantage Pro-2, 24hr fars, solar, soil/leaf station, extra temp stations, no U.V. WeatherLink IP.
Re: Basic stupid template operations
« Reply #2 on: April 22, 2015, 11:41:22 PM »
With nothing in the source folder, the only thing that'll be generated is the images for gauges etc. When the processing is complete, the Finder is asked to open the processed files with the applications that would normally open that type of file so you can see how they've been processed (e.g. .txt files will be opened in your default text editor for example). Do you have the additional custom web files being processed from for example the Steel gauges - that'd explain where the other files are coming from.


elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6494
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Try my SeaMonkey templates first. (Re: Basic stupid template operations)
« Reply #3 on: April 22, 2015, 11:44:25 PM »
Dear xairbusdriver and WeatherCat web spinners,

Why don't you try getting my Seamonkey templates working first:

http://athena.trixology.com/index.php?topic=956.0

There is a lot of documentation specifically on installation and setup.  You may not like the style of these web templates, but it is a good way to get the hang of how things are organized and will help you understand how some of the more complex web templates work.

Cheers, Edouard  [cheers1]

xairbusdriver

  • Storm
  • *****
  • Posts: 3126
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: Basic stupid template operations
« Reply #4 on: April 23, 2015, 01:01:09 AM »
Quote from: WCDev
Do you have the additional custom web files being processed from for example the Steel gauges - that'd explain where the other files are coming from.
Well, I didn't even know the "Test... Locally" would even work without having Enable Custom Web Pages ticked! [banghead] I'm sure I've forgot that it was probably always enabled. [blush]

WC seems to be updating the images just fine, latest versions show a time only a few minutes ago and I started this thread well before that. :)

Nor do there appear to be any new txt or html files in there. The OS is not trying to open any text files, but there are none in that directory, now, anyway.

Unfortunately, Safari insists on opening the wx.css file when I have changed the default browser to Foxfire. The file also shows "BBEdit" as the app that should open it with the normal 'open' methods. I may try deleting Safari and install it from my other Mac. It may be that its cache or some other file simply is corrupted.

Right now, I'm not sure I even know how WC knows where to FTP web files. When I try to provide a path to the directory in my web space, the test reports "curl: (9) Server denied you to change to the given directory". If I use just "ftp://domainname.com/" I get the "All OK..." message. The message also says it has successfully uploaded a "WeatherCat_test.html" file, but it must also send a 'delete' message after that, since I don't see such a file in the files. But this is a different problem, one at a time is enough for me! I'd just like to get Safari to shut up.

Edouard, every time I see "Seamonkey" I think you're talking about an amail app that tried to take Eudora's place! Apparently that is now the name of a text editor?
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


xairbusdriver

  • Storm
  • *****
  • Posts: 3126
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: Basic stupid template operations
« Reply #5 on: April 23, 2015, 05:06:40 PM »
Progress! I now have the Atkins Template working on the web! [computer]

The key was to change the info in the WC FTP settings. As I mentioned above, I was confused as to how WC knew where to FTP the files. I finally noticed the info in Fetch for the path to my space. After adding that piece plus the name of the directory name in the info in the FTP Details in WC, things started working. The FTP test reported "OK". I can now see the "WeatherCat_test.html" that is created by that test. WC is/was working perfectly, all along.

BTW, I also edited the "wx.html" file to use the radar image of the local facility.

Onward and webward, I'll start 'playing' with other Templates (and ignore what Safari does! [banghead]).
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


Blicj11

  • Storm
  • *****
  • Posts: 3941
    • EW3808
    • KUTHEBER6
    • Timber Lakes Weather
  • Station Details: Davis Vantage Pro2 Plus | WeatherLinkIP Data Logger | iMac (2019), 3.6 GHz Intel Core i9, 40 GB RAM, macOS Ventura 13.6 | Sharx SCNC2900 Webcam | WeatherCat 3.3 | Supportive Wife
Re: Basic stupid template operations
« Reply #6 on: April 23, 2015, 08:28:09 PM »
The Seamonkey template is a very nice template that Edouard built specifically for displaying your weather data on your website. You would use it rather than the Atkins template that is included with WeatherCat. One advantage of using Edouard's template is that he is here to provide support, while Todd Atkins, to my knowledge is no longer supporting his template, although lots of forum members still use the Atkins template so you should be able to get some help with it as well. Just be aware as we move forward with improvements and changes to both WeatherCat and OS X, you'll need to be able to make some changes in your template to keep it current.

Another nice template available on this forum is the Leuvan template. One of these should be dead on for you.

And here I am preaching about templates when I don't use any of them. I had to build my weather page in WordPress, which is not nearly as slick as the templates the rest of you are using.
Blick


xairbusdriver

  • Storm
  • *****
  • Posts: 3126
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: Basic stupid template operations
« Reply #7 on: April 23, 2015, 08:43:33 PM »
I'm now playing with the Steel templates. Very marginal success. It's not the templates (or the use of a WYSIWYG editor) that are giving me trouble. It's simply getting the right files in the right location for WC to 'see' them. That should be dead simple. I certainly qualify for that last part, but apparently, I can't reed thee direcksions gud enuf! [banghead] I'm seeing WC add its images to the WCCustomWeb folder, but the page shows only the labels that would be under each gauge, not the actual Steel gauges. Also, the default settings are not what I have set up in WC; C? instead of F?, mm instead of inches, km/h instead of mph, etc. I can see where these units are set in one of the js files, but I can't figure out how to get the various files in the three folders to communicate with WC.

Good thing I like challenges... I probably need to take a few more basic/baby steps before try to get SG to work. [rockon] Part of the fun is editing files on the mini while using the iMac plus Screen Sharing to view the edit results! [lol]
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


Blicj11

  • Storm
  • *****
  • Posts: 3941
    • EW3808
    • KUTHEBER6
    • Timber Lakes Weather
  • Station Details: Davis Vantage Pro2 Plus | WeatherLinkIP Data Logger | iMac (2019), 3.6 GHz Intel Core i9, 40 GB RAM, macOS Ventura 13.6 | Sharx SCNC2900 Webcam | WeatherCat 3.3 | Supportive Wife
Re: Basic stupid template operations
« Reply #8 on: April 23, 2015, 10:51:09 PM »
Xair:

If you follow the instructions in the SteelSeries wiki the gauges will work. If you leave out a few steps, they will not.

If the gauges aren't showing, you did not follow the instructions for either Option 1 or Option 2.

You don't set the preferences for F or C in a script. You use the buttons in the box at the bottom of the gauge display. When you get it working properly, you will be able to set your preferences for units of measure.

In WC Preferences | On-line | Custom Web you set two paths. (1) Whatever path you identify in Set HTML Source is where you copy your realtimegaugesWC.txt file from the SteelSeries download. (2) Whatever path you identify in Set Save Path is where Weathercat automatically updates the realtimegaugesWC.txt file each time it process the weather data and sticks it in that file, replacing the tags with data.

WeatherCat will then follow whatever FTP instructions you set in the Edit FTP Details window and upload the realtimegaugesWC.txt file from the Set Save Path folder to your site.

Other than FTPing the SteelSeries Folders one time to your website, and the tags folder (which you have to create yourself, but you can just copy the contents from the wiki), the processed realtimegaugesWC.txt is the only file that gets FTPd to update the gauges with data and populate the popup graphs.

If you ask more specific questions, we can give you more specific suggestions.
Blick


Bull Winkus

  • Storm
  • *****
  • Posts: 782
    • EW0095
    • KARHORSE2
    • WU for Horseshoe Bend, Arkansas
  • Station Details: Davis Wireless Vantage Pro 2, iMac 24"
Re: Basic stupid template operations
« Reply #9 on: April 23, 2015, 10:58:42 PM »
Good explanation, Blick! ? Xair, you'll get it. You know, lack of specificity may or may not be my problem, too!

 [cheers1]
Herb

Blicj11

  • Storm
  • *****
  • Posts: 3941
    • EW3808
    • KUTHEBER6
    • Timber Lakes Weather
  • Station Details: Davis Vantage Pro2 Plus | WeatherLinkIP Data Logger | iMac (2019), 3.6 GHz Intel Core i9, 40 GB RAM, macOS Ventura 13.6 | Sharx SCNC2900 Webcam | WeatherCat 3.3 | Supportive Wife
Re: Basic stupid template operations
« Reply #10 on: April 23, 2015, 11:08:57 PM »
Encoding Specificity is a principle that states that human memories are more easily retrieved if external conditions (emotional cues) at the time of retrieval are similar to those in existence at the time the memory was stored. For instance, happy memories are easier to access when happy, or bad memories are more accessible when in a depressed mood. At my age, I'm lucky to remember anything so my memories are best retrieved when I am lucky.

I have no idea why I am posting this but Herb has given me so many opportunities to laugh I am hoping this one might be a small token of my appreciation. Very small.
Blick


elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6494
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Back to Blacque Jacque Shellacque (Was: Basic stupid template operations)
« Reply #11 on: April 23, 2015, 11:23:44 PM »
Dear Blick and WeatherCat graceful aging types . . . .

At my age, I'm lucky to remember anything so my memories are best retrieved when I am lucky.

This situation calls once more for Blacque Jacque Shellacque:

 ;) . . . . THIS!?!?!?!??!??  Is being saved!?!??!??!??!?  . . .  [biggrin]

Cheers, Edouard  [cheers1]

Bull Winkus

  • Storm
  • *****
  • Posts: 782
    • EW0095
    • KARHORSE2
    • WU for Horseshoe Bend, Arkansas
  • Station Details: Davis Wireless Vantage Pro 2, iMac 24"
Re: Basic stupid template operations
« Reply #12 on: April 23, 2015, 11:36:11 PM »
 [lol2] Good one, Blick! ? I guess since you're a pretty lucky guy, you get to remember a lot.  [wink]

 [cheers1]
Herb

xairbusdriver

  • Storm
  • *****
  • Posts: 3126
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: Basic stupid template operations
« Reply #13 on: April 24, 2015, 02:28:08 AM »
Quote
If you ask more specific questions, we can give you more specific suggestions.
What is the meaning of this life? Is that 'specific' enough?

Quote
If the gauges aren't showing, you did not follow the instructions for either Option 1 or Option 2.
Couldn't agree more. The only problem is which option and what instruction. [banghead] I've been working on the Leuven template files most of the afternoon. Very specific, file-by-file instructions. K.I.S.S.
If I can't get that template working, I may start over with the Steel template... from a new download, even. :D
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


xairbusdriver

  • Storm
  • *****
  • Posts: 3126
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: Basic stupid template operations
« Reply #14 on: April 24, 2015, 02:54:14 AM »
I may have discovered something that could be the cause of my problems. I went to the Wxforum to register and went through the process ~5 times getting a "complete Captcha" message each time. I finally realized the three little images at the bottom of the page were part of the Captcha process! [banghead] I kept wondering why I would care if the images were displayed vertically rather than horizontally! Never noticing that each one could be other than upright! "Vertical" had nothing to do with them, even when they are upright, they will still be horizontal! [rolleyes2] [blush] I must not get out enough, I've never seen a Captcha with this kind of added human requirement. Oh well...
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system