renamed to loft service to be more clear, added solution file generation naming via regex, few qol things
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import csv
|
||||
import io
|
||||
import re
|
||||
|
||||
def items_csv_to_dict(items_csv_reader):
|
||||
items = []
|
||||
@ -15,6 +16,8 @@ def items_csv_to_dict(items_csv_reader):
|
||||
for key, col in enumerate(headers):
|
||||
if key == 0:
|
||||
item[col] = row[key]
|
||||
elif col == 'b_param':
|
||||
item[col] = row[key]
|
||||
elif key > 1:
|
||||
item['attributes'].append({
|
||||
'id': col,
|
||||
@ -43,3 +46,6 @@ def solution_to_file(buffer, total_form_items, forms):
|
||||
buff2 = io.BytesIO(buffer.getvalue().encode())
|
||||
|
||||
return buff2
|
||||
|
||||
def key_to_uuid(key):
|
||||
return re.split("_", key)[0]
|
||||
|
Reference in New Issue
Block a user