5,838
edits
Line 27: | Line 27: | ||
= NOAA style Report Naming = | = NOAA style Report Naming = | ||
The report | The files that hold the report content, have to indicate which month, or year, they cover. This means the file names consist of a fixed [[#The prefix literal|prefix literal]], then a [[#The date modifier between the literals|code representing a date]], and finally the literal ".txt" to confirm to the operating system that the report is a text file. | ||
Microsoft Operating Systems use file extensions (that by default are hidden) to indicate file types, other operating systems are less fussy. | |||
Cumulus (both 1 and MX) allow the prefix, and date specifying, parts of the file name to be customised. '''However, if you use the [[New Default Web Site Information|MX Default Web Site]] or third-party [[:Category:User_Contributions|User Contributions]], then these assume you are using the default configuration settings for the release of Cumulus when they were written.''' For example, this means the date specifier must be purely numerical (to avoid coping with language variants). | |||
The table later will explain all the possibilities for the date specifier. For now, it is important to stress that all parts of the file name are parsed by the date interpreter, and that is why the prefix and suffix to the date specifier must be quoted as literals. | |||
* For MX, this means all parts of the file name for the report must be understandable when processed by a C# date format parse. | |||
* The legacy Cumulus uses Delphi to interpret the file name. | |||
<br> | |||
For simplicity, the codes recommended by this page will work for both the C# date format parser, and the Delphi interpreter: | |||
# The capital letter "M" is the basis for identifying month (e.g. MM is a 2 digit month number) | |||
# The lower case "y" is repeated to indicate the number of digits to be used to represent the year | |||
# Any fixed text is enclosed by quotes to be treated as a literal. | |||
==Viewing reports locally== | |||
The local report viewer is able to display these reports, if you customise the file name (because it can find out how you have configured the file name): | |||
* The [[MX Administrative Interface|MX local interface]] report viewers for monthly and annual reports have access to [[Cumulus.ini]] | |||
* The [[Cumulus_Screenshots#View_Menu|Cumulus 1 report viewers]] have access to [[Cumulus.ini (Cumulus 1)]] | |||
So if you are only viewing the reports locally, you can customise the file names. | |||
==Viewing reports on your web site== | |||
The configuration file contains information like passwords, so it must not be accessible to your web site. The latest file name for your monthly and annual reports are available by using [[Webtags#Miscellaneous|web tags]] so can be included in a [[Cumulus template file]] that is [[Customised_templates#What_is_meant_by_.27Cumulus_processes_templates.27|processed by Cumulus]] and therefore that information can be passed to your web site. | |||
As stated earlier, the default web site provided with MX, and third party report viewers for your web site, assume that the files containing the report text are named by the default names. Third party report viewers will also make assumptions about the encoding used, based on the Cumulus default encoding at the time the third party viewer was written, '''that may not''' be the default MX now uses, or the default in Cumulus 1. | |||
If you customise any part of the file name, you must write your own script to be able to interpret the file name to find reports for displaying on your web server. If you want to see these reports on your web server and are not able to write your own scripts, don't modify anything, and skip all instructions about possible alternatives. | |||
==The prefix literal== | ==The prefix literal== | ||
As stated earlier, although the prefix can be customised as explained below, you must leave these at the default if you are using web pages provided by MX or by third-parties to display these reports on your web site. | |||
Cumulus MX accepts single or double quotes to define a literal for these report names. | |||
The yearly reports have a default prefix literal of "NOAAYR". | The yearly reports have a default prefix literal of "NOAAYR". If you are not using standard scripts on your web site, you might choose to use 'Blwyddyn' (Welsh language), "Année" (French language), or the equivalent in your language, to make the file name more meaningful for you. | ||
The monthly reports have a default prefix literal of "NOAAMO". As before, if you are able to write your own script, you might prefer to change this default literal into your own language. | |||
==The date modifier between the literals== | ==The date modifier between the literals== | ||
The default selected by Steve Loft is '''MMyyyy''' and '''yyyy''' respectively (expressed in a way that suits both Cumulus 1 and MX) so the inserted part is all numerical. | The default selected by Steve Loft is '''MMyyyy''' and '''yyyy''' respectively (expressed in a way that suits both Cumulus 1 and MX) so the inserted part is all numerical. As already emphasised, you must keep these defaults if you want to use the MX default web pages, or a third-party supplied report viewing script for your web site. The report viewer in both the legacy Cumulus and the current MX release will accept all options shown here. | ||
The report viewer in both the legacy Cumulus and the current MX release will accept all options shown here | |||
Here is a table showing the main alternative options for date modifier, and how they look with the fixed literal prefix and the text file type literal suffix as required for the box where you enter the file name within Cumulus settings. | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
!style="width:150px" | {{Version badge 1}}Delphi Specifier for Cumulus 1.9.x | !style="width:150px" | {{Version badge 1}}Delphi Specifier for Cumulus 1.9.x | ||
!style="width: | !style="width:100px" | [[File:Badge vMx.png]]Mono Specifier for Cumulus MX | ||
!style="width: | !style="width:700px" | Explanation | ||
!style="width:150px" | | !style="width:150px" | What to type into settings box | ||
!style="width: | !style="width:150px" | Example of produced name | ||
|- | |- | ||
|colspan="5" style="background:lightgray;"|Yearly report | |colspan="5" style="background:lightgray;"|Yearly report | ||
Line 62: | Line 87: | ||
|YYYY or yyyy | |YYYY or yyyy | ||
|yyyy | |yyyy | ||
| | |This is the default mentioned above, and must be used for standard web page viewers. Only Cumulus 1 is case insensitive, use lower case for full compatibility. | ||
|"NOAAYR"yyyy".txt" | |"NOAAYR"yyyy".txt" | ||
|NOAAYR2010.txt | |NOAAYR2010.txt | ||
Line 68: | Line 93: | ||
|YY or yy | |YY or yy | ||
|yy | |yy | ||
| | |This represents a 2 digit year number alternative format, if you really feel the need to be different. People using old Microsoft Windows Operating Systems selected this because they needed to keep file names short, at only 8 characters. | ||
|"NOAAYR"yy".txt" | |"NOAAYR"yy".txt" | ||
|NOAAYR10.txt | |NOAAYR10.txt | ||
Line 76: | Line 101: | ||
|mmyyyy (or MMYYYY) | |mmyyyy (or MMYYYY) | ||
|MMyyyy | |MMyyyy | ||
|Note that Cumulus 1 | | This is the standard date specifier, and must be used for any standard web pages for viewing these reports. Note the difference between the case used by MX and the default used by Cumulus 1, that caused some problems for those migrating from Cumulus 1 to early MX releases who kept their cumulus.ini file. | ||
From release 3.3.0 onwards, if you migrate from Cumulus 1 (where case does not matter) to Cumulus MX (where case does matter), MX will rewrite [[Cumulus.ini]], if it reads "NOAAMO'mmyy'.txt" (MX believes "mm" '''means minutes''', not month). It is automatically changed into "NOAAMO'MMyy'.txt" (which works on both Cumulus 1 and MX). | |||
|"NOAAMO"MMyyyy".txt" | |"NOAAMO"MMyyyy".txt" | ||
|NOAAMO032010.txt | |NOAAMO032010.txt | ||
Line 82: | Line 109: | ||
|mmyy (or MMyy or mmYY or MMYY) | |mmyy (or MMyy or mmYY or MMYY) | ||
|MMyy | |MMyy | ||
| | | This is an alternative numerical representation that represents a 2 digit year number alternative format, if you really feel the need to be different. People using old Microsoft Windows Operating Systems selected this because they needed to keep file names short, in fact they changed the prefix too, so the file name was only 8 characters. | ||
Note if you are using Cumulus 1: use the legacy software to change the Cumulus 1 specifier, to match the MX one, certainly before you migrate. | |||
|"NOAAMO"MMyy".txt" | |"NOAAMO"MMyy".txt" | ||
|NOAAMO0310.txt | |NOAAMO0310.txt | ||
Line 88: | Line 117: | ||
|yyyy-mm (or YYYY-MM) | |yyyy-mm (or YYYY-MM) | ||
|yyyy-MM | |yyyy-MM | ||
| | | This is an alternative numerical representation based on part of the ISO 8601 format, <big>this naming format is popular as it results in files being in chronological sequence when listed by file name</big>, however remember that this will not be recognised by any third-party web page script, nor by the MX default web page script. | ||
|"NOAAMO"yyyy-MM".txt" | |"NOAAMO"yyyy-MM".txt" | ||
|NOAAM2010-03.txt | |NOAAM2010-03.txt | ||
|- | |- | ||
|yyyymm (or YYYYMM) | |||
|yyyyMM | |||
| This is a variant on the previous, it just takes the default and then swaps year and month, again this naming format is popular as it results in files being in chronological sequence when listed by file name, again remember that this will not be recognised by any third-party web page script, nor by the MX default web page script. | |||
|"NOAAMO"yyyyMM".txt" | |||
|NOAAM201003.txt | |||
|- | |||
|yymm (or YYMM) | |||
|yyMM | |||
| This is another variant on the previous two used by those who prefer short file names, again this naming format is popular as it results in files being in chronological sequence when listed by file name, again remember that this will not be recognised by any third-party web page script, nor by the MX default web page script. | |||
|"NOAAMO"yyyyMM".txt" | |||
|NOAAM201003.txt | |||
|- | |||
|MMMyyyy (or mmmyyyyy or mmmYYYY or MMMYYYY) | |||
|MMMyyyy | |MMMyyyy | ||
| | | This alternative, loses the numerical representation of a month, and inserts a short month name instead. For some locales this abbreviated month will end in a full stop (e.g. '''Feb.''' in Australian English), for others it will be just 3 or 4 letters (e.g. ''Feb'' in British English). Of course, the locale might produce the month abbreviation (with or without the full stop) in another language (e.g. '''févr.''' in French). | ||
Although you may feel this provides a more readable file name, remember it will not work with the standard scripts for your web site. | |||
|"NOAAMO"MMMyyyy".txt" | |"NOAAMO"MMMyyyy".txt" | ||
| | |NOAAMOMar.2010.txt (for some English locales) | ||
|- | |||
|_MMMM_yyyy (other case variants) | |||
|_MMMM_yyyy | |||
| In theory, you could have very long file names, with the full month name. In practice, I doubt if anyone chooses this. It is normally unwise to have unnecessary long file names. | |||
|"NOAAMO"_MMMMyyyy".txt" | |||
|NOAAMO_February_2010.txt (for some English locales) | |||
|} | |} | ||
=A brief history of these reports = | =A brief history of these reports = |
edits