diff options
author | Philipp Wollschlegel <folken@kabelsalat.ch> | 2013-12-16 21:38:50 +0100 |
---|---|---|
committer | Philipp Wollschlegel <folken@kabelsalat.ch> | 2013-12-16 21:38:50 +0100 |
commit | 50f465d9ffa9afe4cb40615e0425980adc9a1b42 (patch) | |
tree | 9b2f8bdcff9adbc7e4632ae4e08700950d033006 /Vereinskram/Finanzplanung/tablegen.py | |
parent | 1ad93d874fc3bd97abc077ade91ae9e2c0f40cb8 (diff) | |
parent | e5b1dfe9420c5ec1d6a36261004ba669144b5195 (diff) |
Merge branch 'master' of git+ssh://www-static.zrh.internetputzen.com/home/www/wiki.starship-factory.ch/wiki
Conflicts:
index.mdwn
Diffstat (limited to 'Vereinskram/Finanzplanung/tablegen.py')
-rw-r--r-- | Vereinskram/Finanzplanung/tablegen.py | 16 |
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 "\"\"\"]]" |