summaryrefslogtreecommitdiff
path: root/app/income/parser.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2020-11-11 21:49:34 -0500
committerluxagraf <sng@luxagraf.net>2020-11-11 21:49:34 -0500
commit199184b3b680bc4c8878bf11a60c0fbf72fb612f (patch)
tree92195ea8a1ba5e61fefca51896c2b8e01cdeaf43 /app/income/parser.py
parent129a8545b520380a8567a4e7405634250f3d7da5 (diff)
removed some things I wasn't using to clean up code base
Diffstat (limited to 'app/income/parser.py')
-rw-r--r--app/income/parser.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/app/income/parser.py b/app/income/parser.py
deleted file mode 100644
index b19d039..0000000
--- a/app/income/parser.py
+++ /dev/null
@@ -1,23 +0,0 @@
-import csv
-import datetime
-from .models import InvoiceItem
-
-
-def read_timesheet():
- with open('timesheet.csv', newline='') as csvfile:
- reader = csv.reader(csvfile, delimiter=';')
- counter = 0
- f = "%Y-%m-%d %H:%M:%S"
- for row in reader:
- if counter > 0:
- print(row[4])
- timer = row[0]+' '+row[1]
- timerer = row[0]+' '+row[2]
- time_start = datetime.datetime.strptime(timer, f)
- time_end = datetime.datetime.strptime(timerer, f)
- InvoiceItem.objects.get_or_create(
- time_start=time_start,
- time_end=time_end,
- work_done=row[4]
- )
- counter = counter + 1