summaryrefslogtreecommitdiff
path: root/Vereinskram/Finanzplanung/tablegen.py
blob: 36c52fc61048dcea9111221603d10f6a6383b99d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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 "\"\"\"]]"