fix email and remove qoutes from conf

This commit is contained in:
2023-07-13 17:50:33 +02:00
parent 8d2fb79d06
commit 8be400a721
4 changed files with 34 additions and 17 deletions

12
run.py
View File

@@ -1,5 +1,6 @@
from donationcalc import app
from donationcalc import donationconfig
import donationcalc.models
import argparse
def parseArgs(parser):
@@ -14,6 +15,17 @@ if __name__ == '__main__':
if args.rebalance:
donconf = donationconfig.donationconfig()
donconf.rebalance()
sender = donationcalc.models.sender()
donors = []
f = open("donors.txt", "r")
for line in f.readlines():
linesplit = line.split(",")
newdonor = donationcalc.models.donor(email = linesplit[0], monthly = linesplit[1])
donors.append(newdonor)
f.close()
donationcalc.models.rebalanceall(sender,donors)
exit()
app.run(debug=False)