Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

JavaScript 'Viewer' of Cumulus generated NOAA style reports

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderators: daj, TNETWeather

User avatar
beteljuice
Posts: 2456
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

JavaScript 'Viewer' of Cumulus generated NOAA style reports

Postby beteljuice » Tue Feb 14, 2012 4:22 pm

JavaScript Web reader of Cumulus generated NOAA style reports

HTML Level: Beginner (If you can read comments and use a txt editor .....)

V1.0 - Feb 2012

V2.0 - Feb 2012
    js file rewritten and 'turbo charged' :D
    alternative css file added that puts highlight INSIDE buttons.
    V1.0 users only need to upack / upload noaarep.js, noaarep_alt.css

This is a JavaScript version of the preferred PHP Web reader of Cumulus generated NOAA style reports.

IF YOUR SERVER HAS PHP FUNCTIONALITY USE THE PHP VERSION: PHP Version

For:
    If you don't have PHP ...

Against:
    Not so robust.
    Not as 'flexible'.
    Can be 'slow' to build the initial page.
    Can't cope with reserved or accented characters in the reports.

Functionality:
Search for available Cumulus generated NOAA reports and display in a Cumulus style web page (or DIY).
Initially the latest report will be displayed.

'Drop Down' style menu

'Classic' (full menu)

OK - Lets begin

In your servers weather directory, create a sub directory called NOAA-reports, then In Cumulus, generate NOAA monthly and annual reports for every month and year that you have data for, and save them using the default file names.
Upload all of the reports to the NOAA-reports directory on your web server (This year and latest month will be an ongoing upload)
(If you wish to have a different name for the directory you will need to change a variable which is in the html file)

beteljuice.zip


Download the zip file, unpack it, It will create a directory (beteljuice) that contains 4 files:

    noaa_reports.html - A cumulus style web page that is the only thing to edit !
    noaarep.css - the stylesheet for the menu system and report
    noaarep_alt.css - an alternate stylesheet for users with dark backgrounds, or you might just prefer it !
    noaarep.js - Here Be Dragons, break this you're on your own (and I break your fingers)


Using a txt editor like notepad, edit noaa_reports.html - everything is commented ;)
NB: This is NOT a xxxxT file that requires processing / uploading by Cumulus; although you could make it one by adding at least one <#webtag> somewhere.

Go through it from start to end carefully paying attention to the <!-- Edit lines. You will need to change the title, location, and other things for the information or language that is pertinent to your site.

Save it, and upload the 4 files to your server weather directory (change the noaa_reports.html file name if you want) and that's it.
Just refer to it as (mywebspace/weather)/noaa_reports.html (or whatever you have called it).

Don't forget to add links to your existing Cumulus xxxxT.htm pages.

Tip: In your links menu(s), if you add a space between the colons eg. : : then if the menu gets 'too wide' it will auto-wrap.

Tip: If you have existing NOAA style reports from other softwares, then you should be able to copy them to the NOAA-reports directory and as long as you rename them in the Cumulus format they should be found and displayed OK ;)


NOAA Style Reports:
The word Style is IMPORTANT - these are NOT NOAA reports !
It also means that the layout is 'fixed' and is meant to look like the old teleprinter output.
This is the way the software(s) have created them and is nothing to do with the script !


Intermediate => Advanced Level:
Using it in your own design pages.

There are two sections in noaa_reports.html which are commented <!-- beteljuice REQUIRED **** beteljuice REQUIRED ****
One in the <head> section and one in the <body> section. Just cut 'n' paste into those sections of your page.

Note(s): A few of the font faces / size / colour will be 'Inherited' by the style(s) in your page or the 'container' you paste the <body> code in.

The report and reports nav menu are 635px. wide.

IMPORTANT ! DO NOT DELETE OR RENAME ANY id=".... - the script will NOT work without them.

WORKING EXAMPLE (Thanks to Darknstormy)

WORKING EXAMPLE With the alternative style sheet (Thanks to bnwrx)


Once again, break it and you're on your own !!!
You do not have the required permissions to view the files attached to this post.
Last edited by beteljuice on Fri Nov 09, 2012 2:58 pm, edited 18 times in total.
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
beteljuice
Posts: 2456
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo

Postby beteljuice » Wed Feb 15, 2012 2:35 pm

DIY example added above ..
Image
......................Imagine, what you will KNOW tomorrow !

bnwrx
Posts: 448
Joined: Wed Feb 25, 2009 12:01 am
Weather Station: Ambient WS2095 (Fine/Offset)
Operating System: Windows 10 64bit
Location: Woodland Park, Colorado USA
Contact:

Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo

Postby bnwrx » Thu Feb 16, 2012 7:33 pm

Beteljuice, Thanks so much for your work with this script. I really appreciate having your expertise and time in developing it.

Here is my page(with a few edits):http://woodlandweather.org/noaa_reports.html

User avatar
beteljuice
Posts: 2456
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo

Postby beteljuice » Thu Feb 16, 2012 11:24 pm

Highlighted borders don't work against a black background (I didn't appreciate that) :D - nevertheless an effective colour combination.

Glad you coped with the instructions. It's always difficult to unassume knowledge.

Somebody using my code (or snippets) is always an ego booster :lol:
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
beteljuice
Posts: 2456
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo

Postby beteljuice » Fri Feb 17, 2012 1:58 pm

V2.0 Available

The controlling noaarep.js has been rewritten exploiting AJAX asynchronicity and some beteljuice fuzzy logic, making the filecheck routine work faster.

For people putting it on their own dark backgrounds, or perhaps just because you like it - an alternative stylesheet noaarep_alt.css is available that puts selected / hover highlights INSIDE the nav buttons :o

Those using V1.0 only need to unpack / upload these two files.
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
Darknstormy
Posts: 161
Joined: Wed Apr 28, 2010 1:01 pm
Weather Station: Davis Vantage Pro 2 Plus
Operating System: Windows 7 Pro / Ubuntu
Location: Australia
Contact:

Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo

Postby Darknstormy » Sun Feb 19, 2012 11:25 am

isn't anyone excited about this??
ImageImage

optrex
Posts: 12
Joined: Tue Feb 16, 2010 9:44 am
Weather Station: OS 918
Operating System: Linux with XP Virtualbox

Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo

Postby optrex » Sun Feb 19, 2012 10:12 pm

Betel, you little star! Here you are working on cumulus. I wondered where your passion was being directed.
Well I've just moved to a VP2 last week and I am looking at Cumulus to replace WD once and for all because I am sick of it crashing.

Cumulus has been up for 24 hours now without a sinlge issue so things are looking good and its looking like as I suspected, its software that is causing my issues rather than hardware and drivers that have been blamed.

So I have lots I want to be able to do and this looks like a cracking start. Prepare for lots of questions for things I want to replace

I want to get this working in cumulus http://www.nzweather.net/springston/cha ... rature.php from http://weather.wildwoodnaturist.com/downloadsCVW.php
I want to add the noaa reports you've done here
I'd like to get cumulus running my wxSIMmate with station input
I want to sort out how to get my last 6 weeks rain data into the equation as its not showing up despite being put into the cumuls setup as an annual total.
And there was something else that I have forgotten for now - oh yeah a live page to replace this http://www.nzweather.net/springston/live.php

dezzeer
Posts: 35
Joined: Mon May 23, 2011 6:10 am
Weather Station: vantage pro2
Operating System: windows xp
Location: bb2 5jf

Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo

Postby dezzeer » Wed Feb 22, 2012 1:15 pm

many thanks for the work done on this looks great.
just one thing there is a spelling mistake with style spelled wrongly
<H3>NOAA Stlye Reports for beteljuiceton</H3>.

one other great thing is that i was able to upload all the other previous noaa reports from davis.

many thanks again
http://www.dazmather.co.uk

User avatar
beteljuice
Posts: 2456
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo

Postby beteljuice » Wed Feb 22, 2012 1:39 pm

Would that be covered by <!-- Edit for language ? :lol:

Glad to have been of service - but you didn't pay attention to the tip about putting a space between : : in all your menu links did you ;)

... one other great thing is that i was able to upload all the other previous noaa reports from davis.
Yes - something I forgot to mention.

As long as the (previous) reports are renamed in the Cumulus format they should be found and displayed OK ;)
Last edited by beteljuice on Sun Apr 29, 2012 1:23 am, edited 1 time in total.
Image
......................Imagine, what you will KNOW tomorrow !

dezzeer
Posts: 35
Joined: Mon May 23, 2011 6:10 am
Weather Station: vantage pro2
Operating System: windows xp
Location: bb2 5jf

Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo

Postby dezzeer » Wed Feb 22, 2012 1:53 pm

hi beettlejuice
not sure i no what you mean properly with the space thought i had it looking right.

as regards to noaa reports from davis by default it saves them as upper case TXT i had to save them as lower case txt then everything worked fine.

very happy with it and thanks again.
regards Darron.

dazmather.co.uk

User avatar
beteljuice
Posts: 2456
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo

Postby beteljuice » Wed Feb 22, 2012 2:10 pm

not sure i no what you mean properly with the space thought i had it looking right.
You must be viewing full / widescreen. If you look at your index page with the browser 'narrowed' you will see that everything seems to be offset and the data table is 'wide'. This is because the menu links have not 'wrapped' and forced the table to be wider than intended.
Image
......................Imagine, what you will KNOW tomorrow !

dezzeer
Posts: 35
Joined: Mon May 23, 2011 6:10 am
Weather Station: vantage pro2
Operating System: windows xp
Location: bb2 5jf

Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo

Postby dezzeer » Wed Feb 22, 2012 2:30 pm

thanks for that, now can i be a pain and ask how i wrap it.
should it be :: or : :
regards Darron
http://www.dazmather.co.uk
Last edited by dezzeer on Wed Feb 22, 2012 2:32 pm, edited 1 time in total.

bnwrx
Posts: 448
Joined: Wed Feb 25, 2009 12:01 am
Weather Station: Ambient WS2095 (Fine/Offset)
Operating System: Windows 10 64bit
Location: Woodland Park, Colorado USA
Contact:

Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo

Postby bnwrx » Wed Feb 22, 2012 2:31 pm

I am having trouble setting up cumulus to automatically upload the NOAA files to my website. Could someone walk me thru this?

Here is what I have done:
In Cumulus NOAA setup I have put this as the FTP directory path: public_html/noaa_reports.html
FTP is enabled
Both autosaves are enabled in NOAA setup

thanks for any help....

dezzeer
Posts: 35
Joined: Mon May 23, 2011 6:10 am
Weather Station: vantage pro2
Operating System: windows xp
Location: bb2 5jf

Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo

Postby dezzeer » Wed Feb 22, 2012 2:37 pm

hi there

I am having trouble setting up cumulus to automatically upload the NOAA files to my website. Could someone walk me thru this?

Here is what I have done:
In Cumulus NOAA setup I have put this as the FTP directory path: public_html/noaa_reports.html
FTP is enabled
Both autosaves are enabled in NOAA setup

thanks for any help....


can you not just manually upload the page yourself using your ftp client such as filezilla. or are you wanting to upload all the time .
regards Darron
www.dazmather.co.uk

User avatar
steve
Cumulus Author
Posts: 26297
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: None
Operating System: None
Location: On tour in Spain
Contact:

Re: JavaScript 'Viewer' of Cumulus generated NOAA style repo

Postby steve » Wed Feb 22, 2012 2:41 pm

bnwrx wrote:In Cumulus NOAA setup I have put this as the FTP directory path: public_html/noaa_reports.html

That looks like a file/page rather than a directory. You probably want: public_html/noaa_reports

You need to make sure that the directory exists (i.e. you need to create it before Cumulus can upload into it).

Edit: Actually, having looked at your site, I think you want public_html/NOAA-reports for the directory.
Steve
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired


Return to “Web site - General”

Who is online

Users browsing this forum: XBower and 3 guests