annotate display_issues_demo.py @ 17:adca5b3780d2

Add collecting no-prio issues. Restructure. * Move usage examples from collect_issues.py to examples/. Also add a section about this to the readme. This should make it easier to understand how it all works together. As we have two examples now, hardcode the database filenames. * Add a function to create the necessary database command from a list of columns. This makes it easier to work with tracker that have customized their priorities, * Add an example how to collect no-prio issues in a database. Note that the display part is not included. * Cleanup roundup_content_data by removing db file name suggestions and unused "reference db" command. This could be re-added for specific installations if they need it, however it probably should be separated as configuration.
author Bernhard Reiter <bernhard@intevation.de>
date Mon, 09 Jul 2018 12:28:28 +0200
parents 149d01f43e31
children 3bb3d9a9f1b7
rev   line source
3
99c68ebfb3b9 Streamlined to example use.
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
1 #!/usr/bin/env python3
99c68ebfb3b9 Streamlined to example use.
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
2
99c68ebfb3b9 Streamlined to example use.
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
3 """ Fetch issues from a roundup-tracker and save them in a databse.
99c68ebfb3b9 Streamlined to example use.
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
4
99c68ebfb3b9 Streamlined to example use.
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
5 author: Sascha L. Teichmann <sascha.teichmann@intevation.de>
99c68ebfb3b9 Streamlined to example use.
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
6 author: Bernhard Reiter <bernhard@intevation.de>
99c68ebfb3b9 Streamlined to example use.
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
7 author: Sean Engelhardt <sean.engelhardt@intevation.de>
99c68ebfb3b9 Streamlined to example use.
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
8
17
adca5b3780d2 Add collecting no-prio issues. Restructure.
Bernhard Reiter <bernhard@intevation.de>
parents: 13
diff changeset
9 (c) 2010, 2015, 2018 by Intevation GmbH
3
99c68ebfb3b9 Streamlined to example use.
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
10
99c68ebfb3b9 Streamlined to example use.
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
11 This is Free Software unter the terms of the
99c68ebfb3b9 Streamlined to example use.
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
12 GNU GENERAL PUBLIC LICENSE Version 3 or later.
99c68ebfb3b9 Streamlined to example use.
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
13 See http://www.gnu.org/licenses/gpl-3.0.txt for details
99c68ebfb3b9 Streamlined to example use.
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
14 """
99c68ebfb3b9 Streamlined to example use.
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
15
99c68ebfb3b9 Streamlined to example use.
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
16 from display_issues import *
99c68ebfb3b9 Streamlined to example use.
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
17
99c68ebfb3b9 Streamlined to example use.
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
18 cgitb.enable() # (optional) HTML traceback to browser
17
adca5b3780d2 Add collecting no-prio issues. Restructure.
Bernhard Reiter <bernhard@intevation.de>
parents: 13
diff changeset
19 #render_db_stats_as_html("./demo1.db", rcd.SELECT_ALL)
adca5b3780d2 Add collecting no-prio issues. Restructure.
Bernhard Reiter <bernhard@intevation.de>
parents: 13
diff changeset
20 render_db_stats_as_html("./demo1.db",
13
149d01f43e31 Split up render_db_stats_as_html function
Gernot Schulz <gernot@intevation.de>
parents: 7
diff changeset
21 rcd.SELECT_WHERE.format("timestamp > date('now', '-2 month')"))
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)