Log.xml: Difference between revisions

180 bytes added ,  17:35, 31 May 2020
m
no edit summary
mNo edit summary
mNo edit summary
Line 1: Line 1:
File holding entries created in [[Weather_Diary|'Weather Diary']] assessed from Cumulus 1 View menu.
File holding entries created in [[Weather_Diary|'Weather Diary']] assessed from Cumulus 1 View menu.


== Editing this log ===
The file can be edited within Cumulus 1 (Weather Diary on Edit menu), and can be viewed (but not edited) using a XML viewer.
The file can be edited within Cumulus 1 (Weather Diary on Edit menu), and can be viewed (but not edited) using a XML viewer.


This is a piece of PHP code that can read this file and put what it reads (for a particular day) into PHP variables.  Since this diary can hold several entries for the same day, a decision has to be made as to which to report. For snow falling, lying, and depth, this code saves the "worst case" of all the entries for that day. For the "entry" field, the one with latest time is retained.
== Using in your own scripts ==


There is a web page using this code written by Czech author Miloš Jirík (https://pocasi.ok5aw.cz) available on the support forum at https://cumulus.hosiene.co.uk/viewtopic.php?p=83888#p83888
There is a web page using this code written by Czech author Miloš Jirík (https://pocasi.ok5aw.cz) available on the support forum at https://cumulus.hosiene.co.uk/viewtopic.php?p=83888#p83888 and that will display all the snow records on a web page.
 
 
Taking that script as a starting point, the following code snippet is a piece of PHP code that can read this file and put what it reads (for onr particular day) into PHP variables.  Since this diary can hold several entries for the same day, a decision has to be made as to which to report. For snow falling, lying, and depth, this code saves the "worst case" of all the entries for that day. For the "entry" field, the one with latest time is retained.


<pre>
<pre>
5,838

edits