Reports folder: Difference between revisions

5,225 bytes added ,  09:20, 19 August 2021
m
Line 27: Line 27:
= NOAA style Report Naming =
= NOAA style Report Naming =


The report name has to change as the current period (month or year) changes, so Reports must be named using date formatting. For MX, this means all parts of the file name for the report must be understandable when processes by a C# date format parseThe legacy Cumulus uses Delphi to interpret the file name.
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.


In practice this means that the capital letter "M" is the basis for identifying month (e.g. MM is a 2 digit month number), lower case "y" are repeated to indicate the number of digits to be used to represent the year, and any fixed text is enclosed by quotes to be treated as a literal.
Microsoft Operating Systems use file extensions (that by default are hidden) to indicate file types, other operating systems are less fussy.
 
Microsoft Operating Systems use file extensions (that by default are hidden) to indicate file types, so all report names must end with the literal ".txt" toconfirm to the operating system that the report is a text file.
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 siteThe 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==


The monthly reports have a default prefix literal of "NOAAMO".  Some people have changed this into their own language.
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".  I have found Cumulus will actually accept alternatives, you might want to use 'Blwyddyn' (Welsh language) or "Année" (French language) or the equivalent in your language.
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.


Cumulus accepts single or double quotes to define a literal for these report names.
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.
 
Whilst the Viewer provided in Cumulus will accept whatever you put in quotes for this literal, the [[New Default Web Site Information|MX Default Web Site]] will only accept the default.


==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. 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 in settings.
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.  However, the [[New Default Web Site Information|default website]] in current MX releases will only accept the default settings.


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:150px" | [[File:Badge vMx.png]]Mono Specifier for Cumulus MX
!style="width:100px" | [[File:Badge vMx.png]]Mono Specifier for Cumulus MX
!style="width:600px" | Explanation
!style="width:700px" | Explanation
!style="width:150px" | Setting to use that suits both flavours
!style="width:150px" | What to type into settings box
!style="width:600px" | Example of produced name  
!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
|Note that Cumulus 1 accepts lower or upper case, this is the default mentioned above
|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
|Note that Cumulus 1 accepts lower or upper case, this represents a 2 digit year number alternative format
|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 accepts lower or upper case, these are equivalent to default mentioned above, so this is most common for users who first encounter with Cumulus is with MX flavour
| 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
|Note that Cumulus 1 accepts lower or upper case, this represents a 2 digit year number alternative format, this was the format frequently selected by Cumulus 1 users as it keeps file names as short as possible
| 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
||Note that Cumulus 1 accepts lower or upper case, <big>this naming format is popular as it results in files being in chronological sequence when listed by file name</big>
| 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
|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).
|Note that Cumulus 1 accepts lower or upper case, this represents an informative naming format using 3 letter month name as defined for your locale on your device, in '''.NET''' or in '''MONO''' so it is used by those who want to quickly spot which report they want to look at.
 
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"
|NOAAMOMar2010.txt (for English locales)
|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)
|}
|}
If you migrate from Cumulus 1 (where case does not matter) to Cumulus MX (where case does matter), from version 3.3.0 onwards the NOAA default monthly name if it reads "NOAAMO'mmyy'.txt" (MX believes "mm" '''means minutes''', not month) is changed into "NOAAMO'MMyy'.txt" (which works on both Cumulus 1 and MX).


=A brief history of these reports =
=A brief history of these reports =
5,838

edits