Author Topic: Adding "Additional Files" to a Web Page  (Read 635 times)

WeatherguyNH

  • Gentle Breeze
  • **
  • Posts: 41
  • Station Details: Davis Vantage Pro 2. IN Peterborough NH
Adding "Additional Files" to a Web Page
« on: January 26, 2019, 11:05:43 PM »
Hi Everyone:

Using Weathercat V3+, I have a web page on my site where I send up all of my weather readings. I am using the "Custom Web" option in the prefs pane.
See attachment...


I am programming a new website, and all I want to do is have the temperature and a few other readings appear on my home page. I prefer to NOT use the banner option. I thought using the "Additional Files" option might get me there, but I have confused myself with regard to the "Set Path" path?
Is this the path to the server and then web page on the server? Or something else?
Not sure why I am not getting this, old age I guess.

Any tips are appreciated.

Thanks

Rich

Blicj11

  • Storm
  • *****
  • Posts: 3201
    • EW3808
    • KUTHEBER6
    • Timber Lakes Utah
  • Station Details: Davis Vantage Pro2 Plus | WeatherLinkIP™ Data Logger | iMac (late 2013), 3.5 GHz Intel Core i7, 24 GB RAM, macOS Mojave | Sharx SCNC2900 Webcam | Supportive Wife
Re: Adding "Additional Files" to a Web Page
« Reply #1 on: January 26, 2019, 11:43:43 PM »
Rich:

Set HTML Source should be the path where you have all your template files. These are the tags you want to display on your site prior to the actual weather data being processed. WeatherCat will look for files in this folder with the following extensions for WC tags:
.htm .html .htx .css .xml .txt .php .shtml .stm and .shtm 

WC replaces the tags with actual data and stores the result in the Save Path folder.

For example, if you want to display the Sunrise time you need a file in the Set HTML folder called Sunrise.html that contains the tag called SUNRISELOCAL$

WC process that file and stores the result (which is the time that sunrise occurs) in the Set Save Path folder

Set Save Path is the path to where you are storing the weather variables after the tags have been replaced by the actual data. This is the folder from which you are uploading to your site.

You do not need, nor should you use the Additional Files option for what you are trying to do. That option is for when you desire to upload items more often than your normal frequency.
Blick


xairbusdriver

  • Storm
  • *****
  • Posts: 2303
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.14.4/WC 3.0.4
Re: Adding "Additional Files" to a Web Page
« Reply #2 on: January 27, 2019, 01:51:18 AM »
How often and how much of your "home page" changes?

You can certainly use a few WC tags on it and store it in the "HTML Source" path. It will simply be uploaded at the interval you have set on the Main tab of theCustom Web Pages. If you are posting items that often change during the day/week/month, just make a copy and edit it offline as needed. When you've finished, just put it into the same path as listed on the "HTML Source" path and it will be updated at the next interval (I use "every 2 Minutes"). If you manage to move it to the upload path just after WC has replaced the tags with real data but before it actually uploads the files, you will have a page showing the tags rather than the real data for whatever interval you have set on that Prefs page.

I have nearly 30 WC tags on my "home" page and sometimes edit it "live". But I can't remember getting 'caught' in the 'uploaded-before-WC-added-real-data' situation. cmu:-) Still, I agree with Blick, that the "Additional Files" is better used for other things. For example, my Statistics page only updates every 6 hours, and my daily & hourly movies every 30 minutes. There are only two other files in that list and they are the computer and WC uptime values that get updated about every 90 seconds.

WeatherguyNH

  • Gentle Breeze
  • **
  • Posts: 41
  • Station Details: Davis Vantage Pro 2. IN Peterborough NH
Re: Adding "Additional Files" to a Web Page
« Reply #3 on: January 27, 2019, 02:46:58 PM »
Rich:

Set HTML Source should be the path where you have all your template files. These are the tags you want to display on your site prior to the actual weather data being processed. WeatherCat will look for files in this folder with the following extensions for WC tags:
.htm .html .htx .css .xml .txt .php .shtml .stm and .shtm 

WC replaces the tags with actual data and stores the result in the Save Path folder.

For example, if you want to display the Sunrise time you need a file in the Set HTML folder called Sunrise.html that contains the tag called SUNRISELOCAL$

WC process that file and stores the result (which is the time that sunrise occurs) in the Set Save Path folder

Set Save Path is the path to where you are storing the weather variables after the tags have been replaced by the actual data. This is the folder from which you are uploading to your site.

You do not need, nor should you use the Additional Files option for what you are trying to do. That option is for when you desire to upload items more often than your normal frequency.

I truly appreciate the replies from you guys.
I am sure I am not articulating my question very well, and I apologize for that.
I am not a web programmer, I am a weather hobbyist trying to share my hobby online.
Now having said that...
Within the Custom Web setting in WC, I have that set up to populate data on one of my web pages, and it accomplished this feat just fine. In fact, I am very pleased with how this works. However, I have the HTML Source set to this ONE web page, and I don't see a way to have WC upload to another page as well? I am thinking that I don't understand this well enough to set it up to populate ANY web page on my site? Is that possible? Is my set up too restrictive, or is there a way to get set up multiple "HTML Source" pages?

Thank you all for any help clarifying....

Rich

xairbusdriver

  • Storm
  • *****
  • Posts: 2303
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.14.4/WC 3.0.4
Re: Adding "Additional Files" to a Web Page
« Reply #4 on: January 27, 2019, 03:30:10 PM »
Quote
I have the HTML Source set to this ONE web page, and I don't see a way to have WC upload to another page as well?
All you need to do is store those other pages in the same folder as the one you already have for the page that you want WC to update. Actually, anything you store in that folder will be uploaded to your web space. That folder is the one you are "pointing to" in the "HTML Source" area of the WC Custom Web Prefs. I actually have five files in my 'source' folder: custom-gauges-graphs.txt, index.html, station.html, WC-Up-Time.txt, WX-date-time-String.php. As you can see, WC cares not what kind of file they might be, as far as what it will upload for you. What I was suggesting is that you store your "home" page in that location after adding the WC tags (and associated html). WC will scan it for any WC tags, insert the real data and upload it for you at the intervals you have set on that same prefs page (mine is every 2 minutes).

One reason you might not want to store all the pages of your site there is that most of those pages may change only once or twice a week or even less often. But WC will be uploading the exact same, rarely changed file every few minutes. That just wastes your bandwidth which may be limited by your ISP/Web Host.

I think you have the same problem I have: I over-think too many things! [blush] cmu:-)

WeatherguyNH

  • Gentle Breeze
  • **
  • Posts: 41
  • Station Details: Davis Vantage Pro 2. IN Peterborough NH
Re: Adding "Additional Files" to a Web Page
« Reply #5 on: January 27, 2019, 03:56:17 PM »
Quote
I have the HTML Source set to this ONE web page, and I don't see a way to have WC upload to another page as well?
All you need to do is store those other pages in the same folder as the one you already have for the page that you want WC to update. Actually, anything you store in that folder will be uploaded to your web space. That folder is the one you are "pointing to" in the "HTML Source" area of the WC Custom Web Prefs. I actually have five files in my 'source' folder: custom-gauges-graphs.txt, index.html, station.html, WC-Up-Time.txt, WX-date-time-String.php. As you can see, WC cares not what kind of file they might be, as far as what it will upload for you. What I was suggesting is that you store your "home" page in that location after adding the WC tags (and associated html). WC will scan it for any WC tags, insert the real data and upload it for you at the intervals you have set on that same prefs page (mine is every 2 minutes).

One reason you might not want to store all the pages of your site there is that most of those pages may change only once or twice a week or even less often. But WC will be uploading the exact same, rarely changed file every few minutes. That just wastes your bandwidth which may be limited by your ISP/Web Host.

I think you have the same problem I have: I over-think too many things! [blush] cmu:-)

That helps quite a bit, thank you.
However, the way my web server works/host, I MUST have that "Index" web page NOT in a folder. It IS however in the top most folder of the site.
Should I then simply point to the top level folder of the website?
However, if I do that, I don't think WC would populate the pages within folders below the top level?
That is where my weather Data page is located...in a sub folder under the top most site folder. I'd probably have to pull that file and move it out of its existing folder to the top level folder?

Or am I over thinking this again? Does any of that make sense?

Thank you again...

Rich

xairbusdriver

  • Storm
  • *****
  • Posts: 2303
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.14.4/WC 3.0.4
Re: Adding "Additional Files" to a Web Page
« Reply #6 on: January 27, 2019, 07:36:40 PM »
While the folder arrangement on the web space is probably the best way to store your files locally, it is not normally absolutely required. It might help to explain the details about how your hosting company actually gets the html files off your computer and uploaded to your site. In fact, it may be that you are making changes/edits to web-based files via a web interface rather that using files stored on your own computer. I am not familiar with that kind of indirect process. Even if that is what you half to do, I still think WC can handle what you are asking of it. Perhaps you can even tell us who your web host company is and we can look into how it works without your even needing to explain it! ThU5:-) [rockon]

Most of us at the forums create/edit/add/remove and upload our web page files manually, except for the ones we place in the WC "HTML Source" path. Thus, we can have completely different local arrangement of files/folders/etc. than the way the are on our web space.

Feel free to use the Messaging functions here with the "My Messages" menu item or just click the little 'Personal Message' icon in the posters info area to the left of their posts. I'm not an expert but I will be happy to explain things as I understand them. I may(?!) not be purfekt, but I know what works for me. ThU32:-)

WeatherguyNH

  • Gentle Breeze
  • **
  • Posts: 41
  • Station Details: Davis Vantage Pro 2. IN Peterborough NH
Re: Adding "Additional Files" to a Web Page
« Reply #7 on: January 27, 2019, 08:40:01 PM »
Once again, I appreciate the reply.
Based on what you've described, I think my hierarchal folder arrangement may be the culprit. I may have to experiment with this, and then report back to this post because I see others reading this and think there may be others who have questions about how this works.

BTW, my web site is hosted at MacHighway, and I use Dreamweaver 6 to create web pages.
I am currently in the process of redesigning my website, so I continue to learn about web page creation.

Thanks again...

Rich

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 5235
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
What isn't working? (Re: Adding "Additional Files" to a Web Page)
« Reply #8 on: January 27, 2019, 11:51:01 PM »
Dear Rich, Blick, X-Air, and WeatherCat troubleshooters,

I'm having some trouble understanding what you are trying to do and what isn't happening that you would like to have happen.  WeatherCat takes web templates and stores the files it has processed into another local directory on your Mac.  This is the dialog box you included in your posting.  This has no effect at all on your web hosting service.  Once these files have been created, WeatherCat will automatically upload them via FTP to the directory on your website of your choice.

Can you describe what you were hoping to do and apparently are not succeeding in doing?  You may be correct, that WeatherCat doesn't not look in subfolders for templates to convert tags into weather data.  Most of us use a single folder (directory) for weather related webpages.  You can use subfolders for other web related files - just not files that have weather data.

I could be wrong about WeatherCat not being able to make substitutions in subfolders  Can anybody confirm or deny?

Let us know what isn't working for you so that perhaps we can offer you some clearer instructions.

Cheers, Edouard

WeatherguyNH

  • Gentle Breeze
  • **
  • Posts: 41
  • Station Details: Davis Vantage Pro 2. IN Peterborough NH
Re: Adding "Additional Files" to a Web Page
« Reply #9 on: January 28, 2019, 12:14:16 PM »
Thank you for the reply.....

I guess this is probably the simplest explanation...

I have a web page on my site with all of the weather stats/data that WC is able to push out. They populate fine, no problems. That web page is in a folder on my site labeled "Gauges."
What I WANT (For example) to do is put a temperature reading on another page that ISN'T in the folder where the page with all of my weather stats sit. I want to put a current temps reading "CT$" on my home page, but when I do that, nothing happens, it doesn't get populated.
I "think" this is the case because in the web page set up pref in WC I have weather cat point to the folder that has my weather data page, NOT my top level folder.
I don't see any way to have weather cat "point" to multiple folders, so I think my only option would be to move that web page out of that folder and repoint the WC pref for HTML to the top level folder of my website.

I have to experiment to see if that "fixes" my issue.

I hope my explanation makes sense......?

If not, please let me know...

Thank you!

Rich

xairbusdriver

  • Storm
  • *****
  • Posts: 2303
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.14.4/WC 3.0.4
Re: Adding "Additional Files" to a Web Page
« Reply #10 on: January 28, 2019, 10:17:00 PM »
Quote
I don't see any way to have weather cat "point" to multiple folders
That is correct. That is why there is only one "path" to enter in the WC Prefs->On-Line->Custom Web "Enable FTP Upload".First, WC will look in the folder you specified in the "Set Save Path". If there is any file in that folder that has any WC tag, WC will insert the real data at that point in the file. Finally, WC will use its built-in FTP function to upload those file directly to your web site's folder that you specified in the "FTP Details".

Earlier, you posted:
Quote
the way my web server works/host, I MUST have that "Index" web page NOT in a folder.
I'm sure that is the way you understand it, and maybe even what Dream Weaver shows you, but your whole web site is actually already in a "folder" on the computer MacHighway is providing. It is usually called "yourDomainName.com/public_html/". That is also called your "root" directory. NOTE: This assumes you have only one web site,

So, everything you need for your site has either files or folders/directories in that directory.
  • public_html
    • cache directory
    • cgi-bin directory
    • css directory
      • default.css
      • journal-bootstrap.css
      • WX.css
    • Fonts directory
      • AHGBold.ttf
      • Calluna-Regular-webfont.ttf
      • Museo_Slab_500-webfont.ttf
      • etc.
    • images directory
    • includes directory
      • footer.php
      • functions.php
      • header.php
      • etc.
    • .htaccess
    • Computer-Up-Time.txt
    • contact.html
    • Date_Time_contents.php
    • forecast.html
    • guages.html
    • graphs.html
    • index.html
    • error_log
    • error.htmll
    • all-other-WC-web-pages
Remember, that WC only looks at one place on your drive for files you want to put and show WX data. That location is whatever you insert in the "Set HTML Source" but that could just as well be the folder you have your "index" and the other 'mostly WC data' page. WC then scans all the files in that location looking for WC tags. It then inserts the real wx data and moves/copies all the files to the place on your disk listed in the "Set Save Path". Finally, at the interval you have specified (every 2 minutes, in my case), WC will upload all the files it copied to the Set Save Path to your web space named in the "FTP Details" setting.

I suspect that part of the problem is that Dream Weaver also 'wants' files in certain places. Aside from that app not being a way to actually learn how to build a web site and the fact that it will add tons of 'bloat-code', it may also be forcing your to store files in certain places. But, as long as you pointy to that directory in the WC Prefs, WC can do its magic for you. The biggest problem I see is that you will be wasting a lot of bandwidth by uploading static pages several times a minute. That could easily be solved if Dream Weaver allows you to store your main wx page one place along with you index page.

"HTML" (or ".htm" since Windows used to choke at anything more than 3 character suffixes! cmu:-) ) is simply the suffix for what is actually a simple text file. You do not need anything more than a text editor (like the free TextEdit.app) to write an .html file, or a .css, or even .php.  ;) If you can use the post editor at this form to add a bit of style to a post, you can certainly write the text file that becomes your web page. ThU5:-)

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 5235
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Let us know how it turns out. (Re: Adding to a Web Page)
« Reply #11 on: January 28, 2019, 10:22:22 PM »
Dear Rich and WeatherCat web spinners,

I have a web page on my site with all of the weather stats/data that WC is able to push out. They populate fine, no problems. That web page is in a folder on my site labeled "Gauges."
What I WANT (For example) to do is put a temperature reading on another page that ISN'T in the folder where the page with all of my weather stats sit. I want to put a current temps reading "CT$" on my home page, but when I do that, nothing happens, it doesn't get populated.

. . .

I don't see any way to have weather cat "point" to multiple folders, so I think my only option would be to move that web page out of that folder and repoint the WC pref for HTML to the top level folder of my website.

I have to experiment to see if that "fixes" my issue.

I think you have a basic understanding of the problem.  All the web pages containing weather data must end up in the same directory on your web site.  WeatherCat will only put files in one place.

Depending on your web hosting service, you might be able to run a tiny script (usually UNIX shell script) that would copy files from one directory to another.  I don't know if you want to learn how to do that.

It certainly would be easier if you could find a way to keep all your weather-related HTML files in one directory on your web site.

Let us know how the process unfolds.

Cheers, Edouard

WeatherguyNH

  • Gentle Breeze
  • **
  • Posts: 41
  • Station Details: Davis Vantage Pro 2. IN Peterborough NH
Re: Adding "Additional Files" to a Web Page
« Reply #12 on: January 29, 2019, 12:11:38 AM »
Thanks everyone...I will give this a go by next weekend, let you all know if this solved my problem.

Thanks again...

Rich