diff --git a/dashboard_template.xhtml b/dashboard_template.xhtml index 35a6eb7..5256a41 100644 --- a/dashboard_template.xhtml +++ b/dashboard_template.xhtml @@ -175,16 +175,16 @@

Plots

{% for fig in figures %}
- - {{ fig['caption'] }} - + + + {{ fig['caption'] }} +
Abbildung {{ fig['index'] }}: {{ fig['caption'] }}
Download als PNG Download als PDF + Download als SVG
{% endfor %} diff --git a/plot.py b/plot.py index 7c7ec4a..0af9e25 100644 --- a/plot.py +++ b/plot.py @@ -37,7 +37,8 @@ print_today = today.isoformat() filename_now = datetime.datetime.now().strftime("%Y%m%d%H%M%S") -force_renew = True +force_renew_plots = False +force_renew_dashboard = True # https://www.tagesschau.de/ausland/europa/ursula-von-der-leyen-zu-corona-impfstoffen-101.html target_date_for_herd_immunity = datetime.date(2021, 9, 22) @@ -289,7 +290,7 @@ def check_recreate_plot(plot_name): archive_plot_filename = '{}/{}'.format(archive_folder, plot_name) - if os.path.isfile(archive_plot_filename + '.pdf') and not force_renew: + if os.path.isfile(archive_plot_filename + '.pdf') and not force_renew_plots: print('Plot {} already exists'.format(plot_name)) return False @@ -298,7 +299,7 @@ def check_recreate_plot(plot_name): def save_plot(plot_name): folders = [archive_folder, site_folder] - file_formats = ['pdf', 'png'] + file_formats = ['pdf', 'png', 'svg'] file_template = '{folder}/{plot_name}.{format}' for folder in folders: @@ -747,7 +748,7 @@ def render_dashboard(): stylesheet_filename = 'site/rki-dashboard.css' stylesheet_archive_filename = 'site/archive/{}/rki-dashboard.css'.format(filename_stand) - if os.path.isfile(dashboard_archive_filename) and not force_renew: + if os.path.isfile(dashboard_archive_filename) and not force_renew_dashboard: print('Dashboard {} already exists'.format(dashboard_archive_filename)) return