sean@16: #!/usr/bin/env python3 sean@16: sean@16: """ Fetch issues from a roundup-tracker and save them in a databse. sean@16: sean@16: author: Sascha L. Teichmann sean@16: author: Bernhard Reiter sean@16: author: Sean Engelhardt sean@16: sean@16: (c) 2010,2015 by Intevation GmbH sean@16: sean@16: This is Free Software unter the terms of the sean@16: GNU GENERAL PUBLIC LICENSE Version 3 or later. sean@16: See http://www.gnu.org/licenses/gpl-3.0.txt for details sean@16: """ sean@16: gernot@42: from sys import path gernot@42: import os gernot@42: gernot@42: path.append( gernot@42: os.path.join(os.path.dirname(os.path.realpath(__file__)), 'roundup_cc') gernot@42: ) gernot@42: gernot@42: from display_issues import * sean@16: gernot@43: graph = os.path.dirname(os.path.realpath(__file__)) + '/bottledash_graph.html' gernot@43: sean@16: def get_chart(target_div_name): gernot@42: html_string = compile_db_stats_html( gernot@42: rcd.DATABASE_TECH_INTERN, gernot@43: rcd.SELECT_ALL, gernot@43: graph gernot@42: ) sean@16: sean@16: html_string = html_string.replace( sean@16: 'var d3jsInjectionTarget="X";', 'var d3jsInjectionTarget="' + target_div_name + '";') sean@16: sean@16: return html_string sean@16: gernot@42: # print(get_chart('techintern'))