Diese Seite ist statisches HTML und am besten betrachtet mit Java-Script eingeschaltet!

Weather Widget - Web Datendateien

 ·  ☕ 2 Min. Lesen  ·  🤖 SWU
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# gnuplot.rc
# This rc-file is needed to tell gnuplot to create
# a png file with the dimensons needed
# an empty background
# no axes
# no ax tics
# no borders
# fill the boxes the same color of the drawing
# it uses the data file from script made from fresh data for drawing
#
set terminal pngcairo size 1038,80 background rgb "#00000000" transparent
set output '/var/www/html/IMG/curve.png'
set autoscale xfix
set autoscale yfix
set margins 0,0,0,0
unset xtics
unset ytics
unset x2tics
unset y2tics
unset border
unset key
plot '/var/www/html/DATA/curve.data' using 1:2 lc 4 with filledcurve notitle
#plot '/var/www/html/DATA/curve.data' using ($1/1000.):2  lc 4 with filledcurve notitle # has no visible change...

Beispieldaten, die die Scripte erzeugen

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# the file curve.data is named curve.data.txt just for highling at this page
0 -1.72
0 -5.26
1 -1.44
1 -0.21
0 -1.72

1 -1.44
1 -0.21
2 0.23
2 -4.5
1 -1.44

2 0.23
2 -4.5
3 2.17
3 2.46
2 0.23

3 2.17
3 2.46
4 6.86
4 5.35
3 2.17

4 6.86
4 5.35
5 5.82
5 7.61
4 6.86

5 5.82
5 7.61
6 7.72
6 6.79
5 5.82

6 7.72
6 6.79
7 2.88
7 5.95
6 7.72

Die Openweathermap json Datei vom 20. Januar 08:14

Wer möchte, kann sich die json Datei hier downloaden. An sich kann Firefox sie gut darstellen, d. i. hier lokal mit dem Hugo preview auch der Fall, aber wenn ich die html Dateien auf meinen Webserver hochlade, dann wird die json Datei in pre tags eingewickelt und der Firefox application handler für json Dateien kommt nicht zum Zug. Ich habe nicht herausgefunden, warum, oder wie ich das verhindere. Ich empfehle also den download und dann kann man die Datei mit Firefox lokal betrachten und dann klappt das auch mit dem application handler für json Dateien - ich habe damit gearbeitet, als ich die Skripte entwickelt habe. Wie Du das machst, da hilft dir Google. Der Download geht mit Rechtsklick auf den Link und dann siehst du schon die Möglichkeiten, die Datei lokal zu speichern! Oder du nimmst wget ;-)

Screenshot

Screenhot vom WetherWidget


wüsti
Author
SWU
human