Questions about scripts reading lastret.txt

I’m working on the next version of wret.exe, and don’t want to “break” any scripts, so I have some questions:

(1) How many items is enough, and how many is too many? I fulfilled the earlier request to have 5 extra choices from each section, and I’ve had a request for two more (per section, I suppose). That would make a total of 12 per section. I can increase it more (tentatively I’ve just gone to 15). However, I know one reason for using lastret.txt instead of latest.csv was to keep the file size smaller, so I don’t want to overdo it if it’s not needed.

(2) How do the scripts actually parse out the data? Do the columns need regular spacing, as in always expecting a data value to start at a certain position, or do they just read through and assume that an intervening blank means to expect a new value? In other words, does it matter whether the columns are separated by 1 space, 2 spaces, 5 spaces, etc.? The reason I ask is because if I give lots of choices, and try to preserve column positions, but a user chooses less than the maxium number of allowed items, that makes for big gaps between some columns.

(3) I’m wondering whether the following additional temperature items would be useful: the max and min temperatures expected during the, say, half hour surrounding the time in question, taking fluctuations into account. In other words, the max and min of these values would really give the max and min for the day. At 3 PM, it might be 27.8 C (perhaps the highest hourly value of the day), but there would be a max of perhaps 28.4 and a min of 27.2. At 6 AM, the temperature might be 15.4 (the lowest hourly value of the day), with a max and min of 15.7 and 15.1. The final max and min for the day would then be 28.4 and 15.1. Would that, in itself, be a useful output, or should I just provide an option for decimal temperature values in the summaries at the bottom? Or both?




As now are the size of lastret.txt less than 10% of the size of the .csv-file, so at that point there are no worry about the zise if add few more values to lastret.
For how many are too many…Hmm…Maybe 14 per section could a good one? then there would be a few spare if wanted, no-one says they all need to be used, my 3in1 script currently use (or can use) 9 from the upper section and 11 from the lower section.

My script do like this:

  • As delimeter between datas are used 1 space, it first clean up all multiple spaces to one so thats not a problem (like it also replaces all , with . ). But there should allways be at least 1 space between each data, else we see the funny windvalues they saw in sweden when wind and precip got together.
  • When it loop trought the line it do it backwards, this because the weather description sometimes contains spaces and then should mess up rest of the line’s positions. So, weather description should stay where it is allways, at the beginning of the line.
  • First, it loop trought the HEADERS and look up at wich position each data are located and also what datas are available. If ex. no soil-data available are the soil-tab disabled on the webpage.
  • Based on the positions of the headers it then pick up the values.

Max/min-temperatures could be a great additions i think. Then it could be possible to show also the lowest during the nights whats may be useful expecially when near 0C and then also for picking up Frost-warning for the text-box.