From 0af2803ece61b2c66f6551f93114a02d7bf92669 Mon Sep 17 00:00:00 2001 From: Caoimhe Chaos Date: Sun, 27 Oct 2013 23:18:36 +0100 Subject: =?UTF-8?q?Python-Script,=20welches=20die=20Preisliste=20f=C3=BCr?= =?UTF-8?q?=20Beispiele=20generiert.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Vereinskram/Finanzplanung/tablegen.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Vereinskram/Finanzplanung/tablegen.py (limited to 'Vereinskram/Finanzplanung/tablegen.py') diff --git a/Vereinskram/Finanzplanung/tablegen.py b/Vereinskram/Finanzplanung/tablegen.py new file mode 100644 index 00000000..36c52fc6 --- /dev/null +++ b/Vereinskram/Finanzplanung/tablegen.py @@ -0,0 +1,16 @@ +hourprices = [3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 18, 20, 25] +material = [1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5] + +mat_cost = 5 * 7 * 0.01 +hours = 1 + +print "[[!table class=\"mycsstableclass\" data=\"\"\"" + +print "Preis | " + " | ".join(["%d CHF/h" % x for x in hourprices]) + +for factor in material: + print ("%sx Material | " % (factor) + + " | ".join(["%.02f" % round(x * hours + factor * mat_cost, 2) + for x in hourprices])) + +print "\"\"\"]]" -- cgit v1.2.1