Skip to content

Commit d668078

Browse files
Update extract_submissions.py
1 parent 1dbd410 commit d668078

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

.github/scripts/extract_submissions.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,22 +98,23 @@
9898
fname = name[0]
9999
lname = name[-1] if len(name) > 1 else ""
100100

101+
101102
# Pull from contribution_details
102103
contrib_row = next((row for row in contrib_details if int(row["Submission ID"]) == int(sid)), None)
103-
pitch = contrib_row.get("How Would the Nominee Contribute as an Ambassador?", "") if contrib_row else ""
104-
extra = contrib_row.get("Any Additional Details", "") if contrib_row else ""
105-
104+
pitch = str(contrib_row.get("How Would the Nominee Contribute as an Ambassador?", "")).strip() if contrib_row else ""
105+
extra = str(contrib_row.get("Any Additional Details", "")).strip() if contrib_row else ""
106+
106107
checkboxes = "\n".join([line for line in pitch.splitlines() if "☑" in line or "✔" in line])
107-
108+
108109
summary = f"""Contributions:\n{str(submission.get("Contributions", "")).strip()}
109-
110-
Ambassador Pitch:\n{str(pitch).strip()}
111110
112-
Checkbox Summary:\n{str(checkboxes).strip()}
111+
Ambassador Pitch:\n{pitch}
112+
113+
Checkbox Summary:\n{checkboxes.strip()}
113114
114115
Extra Notes:\n{str(submission.get("Extra Notes", "")).strip()}
115116
116-
Additional Info:\n{str(extra).strip()}"""
117+
Additional Info:\n{extra}"""
117118

118119
start = row_idx
119120
for cat, subcat, question in rubric:

0 commit comments

Comments
 (0)