Archived
1
0

Split 7days template into includes. Some optimisations.

This commit is contained in:
2016-09-04 21:02:06 +02:00
parent a9fbfd1384
commit c7209c7641
8 changed files with 30 additions and 105 deletions

View File

@ -1,57 +1,12 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<graph xmlns:xi="http://www.w3.org/2001/XInclude"> <graph xmlns:xi="http://www.w3.org/2001/XInclude">
<size>600, 800</size> <size>600, 800</size>
<fileformat>pngcairo font "arial,8"</fileformat> <xi:include href="includes/format_png.xml" parse="xml" />
<duration>weeks=1</duration> <duration>weeks=1</duration>
<xformat>%a %d</xformat> <xformat>%a %d</xformat>
<dateformat></dateformat> <dateformat></dateformat>
<plot> <xi:include href="includes/hourly_temp_dew_line.xml" parse="xml" />
<yrange>-20, 40</yrange> <xi:include href="includes/hourly_wind_gust_line.xml" parse="xml" />
<source>hourly</source> <xi:include href="includes/hourly_rain_bar.xml" parse="xml" />
<subplot> <xi:include href="includes/hourly_press_line.xml" parse="xml" />
<colour>1</colour>
<title>Temperatur (℃)</title>
<ycalc>data['temp_out']</ycalc>
</subplot>
<subplot>
<colour>3</colour>
<ycalc>dew_point(data['temp_out'], data['hum_out'])</ycalc>
<title>Taupunkt (℃)</title>
</subplot>
</plot>
<plot>
<title>Windgeschwindigkeit (km/h)</title>
<yrange>0, 30</yrange>
<source>hourly</source>
<subplot>
<colour>4</colour>
<ycalc>data['wind_gust'] * 3.6</ycalc>
<title>Boe</title>
</subplot>
<subplot>
<colour>3</colour>
<ycalc>data['wind_ave'] * 3.6</ycalc>
<title>durchschn.</title>
</subplot>
</plot>
<plot>
<yrange>0, 5</yrange>
<source>hourly</source>
<subplot>
<colour>5</colour>
<style>box</style>
<xcalc>data['idx'].replace(minute=30, second=0)</xcalc>
<ycalc>data['rain']</ycalc>
<title>Stündl. Regenfall (mm)</title>
</subplot>
</plot>
<plot>
<source>hourly</source>
<subplot>
<colour>2</colour>
<ycalc>data['rel_pressure']</ycalc>
<title>Luftdruck (hPa)</title>
</subplot>
<yrange>960, 1050</yrange>
</plot>
</graph> </graph>

View File

@ -1,57 +1,12 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<graph xmlns:xi="http://www.w3.org/2001/XInclude"> <graph xmlns:xi="http://www.w3.org/2001/XInclude">
<size>600, 800</size> <size>600, 800</size>
<fileformat>svg font "arial,10"</fileformat> <xi:include href="includes/format_svg.xml" parse="xml" />
<duration>weeks=1</duration> <duration>weeks=1</duration>
<xformat>%a %d</xformat> <xformat>%a %d</xformat>
<dateformat></dateformat> <dateformat></dateformat>
<plot> <xi:include href="includes/hourly_temp_dew_line.xml" parse="xml" />
<yrange>-20, 40</yrange> <xi:include href="includes/hourly_wind_gust_line.xml" parse="xml" />
<source>hourly</source> <xi:include href="includes/hourly_rain_bar.xml" parse="xml" />
<subplot> <xi:include href="includes/hourly_press_line.xml" parse="xml" />
<colour>1</colour>
<title>Temperatur (℃)</title>
<ycalc>data['temp_out']</ycalc>
</subplot>
<subplot>
<colour>3</colour>
<ycalc>dew_point(data['temp_out'], data['hum_out'])</ycalc>
<title>Taupunkt (℃)</title>
</subplot>
</plot>
<plot>
<title>Windgeschwindigkeit (km/h)</title>
<yrange>0, 30</yrange>
<source>hourly</source>
<subplot>
<colour>4</colour>
<ycalc>data['wind_gust'] * 3.6</ycalc>
<title>Boe</title>
</subplot>
<subplot>
<colour>3</colour>
<ycalc>data['wind_ave'] * 3.6</ycalc>
<title>durchschn.</title>
</subplot>
</plot>
<plot>
<yrange>0, 5</yrange>
<source>hourly</source>
<subplot>
<colour>5</colour>
<style>box</style>
<xcalc>data['idx'].replace(minute=30, second=0)</xcalc>
<ycalc>data['rain']</ycalc>
<title>Stündl. Regenfall (mm)</title>
</subplot>
</plot>
<plot>
<source>hourly</source>
<subplot>
<colour>2</colour>
<ycalc>data['rel_pressure']</ycalc>
<title>Luftdruck (hPa)</title>
</subplot>
<yrange>960, 1050</yrange>
</plot>
</graph> </graph>

View File

@ -7,6 +7,6 @@
<style>box</style> <style>box</style>
<xcalc>data['start'] + timedelta(hours=12)</xcalc> <xcalc>data['start'] + timedelta(hours=12)</xcalc>
<ycalc>data['rain']</ycalc> <ycalc>data['rain']</ycalc>
<title>Tägl. Regenfall (mm)</title> <title>Tägl. Regenfall ()</title>
</subplot> </subplot>
</plot> </plot>

View File

@ -4,7 +4,7 @@
<subplot> <subplot>
<colour>2</colour> <colour>2</colour>
<ycalc>data['rel_pressure']</ycalc> <ycalc>data['rel_pressure']</ycalc>
<title>Luftdruck (hPa)</title> <title>Luftdruck ()</title>
</subplot> </subplot>
<yrange>960, 1050</yrange> <yrange>960, 1050</yrange>
</plot> </plot>

View File

@ -7,6 +7,6 @@
<style>box</style> <style>box</style>
<xcalc>data['idx'].replace(minute=30, second=0)</xcalc> <xcalc>data['idx'].replace(minute=30, second=0)</xcalc>
<ycalc>data['rain']</ycalc> <ycalc>data['rain']</ycalc>
<title>Tägl. Regenfall (mm)</title> <title>Regenfall ()</title>
</subplot> </subplot>
</plot> </plot>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<plot>
<yrange>-20, 40</yrange>
<source>hourly</source>
<subplot>
<colour>1</colour>
<title>Temperatur (℃)</title>
<ycalc>data['temp_out']</ycalc>
</subplot>
<subplot>
<colour>3</colour>
<ycalc>dew_point(data['temp_out'], data['hum_out'])</ycalc>
<title>Taupunkt (℃)</title>
</subplot>
</plot>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<plot> <plot>
<title>Windgeschwindigkeit (km/h)</title> <title>Windgeschwindigkeit (/h)</title>
<yrange>0, 30</yrange> <yrange>0, 30</yrange>
<source>hourly</source> <source>hourly</source>
<subplot> <subplot>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<plot> <plot>
<title>Windgeschwindigkeit (km/h)</title> <title>Windgeschwindigkeit (/h)</title>
<yrange>0, 30</yrange> <yrange>0, 30</yrange>
<source>raw</source> <source>raw</source>
<subplot> <subplot>