summaryrefslogtreecommitdiff
path: root/Vereinskram/Finanzplanung/tablegen.py
diff options
context:
space:
mode:
authorCaoimhe Chaos <caoimhechaos@protonmail.com>2013-10-27 23:18:36 +0100
committerCaoimhe Chaos <caoimhechaos@protonmail.com>2013-10-27 23:19:39 +0100
commit0af2803ece61b2c66f6551f93114a02d7bf92669 (patch)
tree027ae5f89930c596d871d80096de7c831a880412 /Vereinskram/Finanzplanung/tablegen.py
parent1c7e0f9587c729f52b70b77c7470748dc844e6cd (diff)
Python-Script, welches die Preisliste für Beispiele generiert.
Diffstat (limited to 'Vereinskram/Finanzplanung/tablegen.py')
-rw-r--r--Vereinskram/Finanzplanung/tablegen.py16
1 files changed, 16 insertions, 0 deletions
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 "\"\"\"]]"