Page 1 of 2
tag currcond
Posted: Thu 14 May 2015 1:48 pm
by courtil
Hello everyone,
I tried several times to integrate the tag: <#currcond> in the scroll of the site gauges:
http://lecourtilauxepines.eu/ternois/index.htm
page:
http://lecourtilauxepines.eu/ternois/gauges.htm
Command line :
it gives me an error; how to fix it ??
Thank you for your information.
cordially
Michel said Courtil
Re: tag currcond
Posted: Thu 14 May 2015 2:03 pm
by beteljuice
It seems to be complaining about the
End
Of
Line - and you also have several.
Code: Select all
"forecast":"Temps frais et couvert, vent faible, pluie faible depuis 13 heures locales.
",
Re: tag currcond
Posted: Thu 14 May 2015 3:42 pm
by courtil
re,
Thank you for your information, but I do not see any end of line characters in my text ??
Code: Select all
temps frais et couvert vent faible pluie faible brume
Thank you our new contribution
cordially
Michel said Courtil
Re: tag currcond
Posted: Thu 14 May 2015 4:55 pm
by steve
What about in your currentconditions.txt file?
Re: tag currcond
Posted: Thu 14 May 2015 5:10 pm
by courtil
hello,
my currentconditions.file
Temps frais et nuageux, vent faible, petite eclaircie
Thanks for infos
cordially
Michel said Courtil
Re: tag currcond
Posted: Thu 14 May 2015 5:12 pm
by steve
Please zip it up and attach it.
Re: tag currcond
Posted: Thu 14 May 2015 5:25 pm
by courtil
re,
here are 3 Zip files:
- Currentconditions.txt zip
- RealtimegaugesT.txt zip
- Realtimegauges.txt zip
Thank you for everything
cordially
Michel said Courtil
Re: tag currcond
Posted: Thu 14 May 2015 6:06 pm
by water01
"forecast":"Dernière mise à jour le <#date format=hh:nn>H locale -- Voici les conditions Météo actuelles à CROISETTE -- Le Soleil se lève à <#sunrise> et se couche à <#sunset> -- Temps actuel : <#currcond> -- La Température est de <#temp>, °C -- L'Humidité relative à <#hum>,% -- La Pression Atmosphérique est de <#press> hPa -- Les Précipitations du jour sont de <#rfall> mm ",
I know Steve writes good code but I doubt any parser in the world is going to sort this out although it appears to make a good attempt!!

Re: tag currcond
Posted: Thu 14 May 2015 6:16 pm
by steve
As Beteljuice told you, you have several end of lines in your file:
2015-05-14 19_13_40-Calendar.png
Note also that "nn" does not mean "minutes" with MX.
Re: tag currcond
Posted: Thu 14 May 2015 6:22 pm
by mcrossley
Your currentconditions.txt contains multiple blank lines
Re: tag currcond
Posted: Thu 14 May 2015 10:36 pm
by beteljuice
From your Currentconditions.txt zip
Temps frais et nuageux, vent faible, petite eclaircieCRLF
CRLF
CRLF
How are you generating it ?
Re: tag currcond
Posted: Fri 15 May 2015 5:31 am
by courtil
Hello everyone,
my command line is generated using
- Notepad ++
or
-EditPade 7 lite
the error only appears HERE if I use the <#currcond>
in the version of the script by Mark crossley - version 2.5.5
With version Scripts by Mark Crossley - Version 2.4.4 - 2013-08-25
no error ???
Thank you for your information.
cordially
Michel said Courtil
Re: tag currcond
Posted: Fri 15 May 2015 6:04 am
by courtil
Hello,
I deleted in currentconditions.txt
unnecessary lines.
the output file: realtimegauges.txt complies display in gauges but gives errors.
Thank you for your information.
cordially
Michel said courtil
Re: tag currcond
Posted: Fri 15 May 2015 6:20 am
by mcrossley
The data in the "date" field (the first one) is wrong. Your realtimegauges.txt has...
"date":"08:nn",
In realtimegaugesT.txt
{"date":"<#date format=hh:nn>",
Needs to be...
{"date":"<#date format=HH:mm>",
Re: tag currcond
Posted: Fri 15 May 2015 6:28 am
by mcrossley
However the parse error is happening in the native browser JSON parse routine, called by JQuery.
I think you need to remove all that HTML encoding, just use standard UTF-8 code. The script encodes any special characters for you.
DO NOT use Notepad, use a proper editor (eg Notepad++) that can save files in UTF-8 format.