Skip to content

Commit

Permalink
Add a line to indicate when the schools.csv was last updated (#237)
Browse files Browse the repository at this point in the history
Co-authored-by: Jonathan Gottfried <[email protected]>
  • Loading branch information
yodarjun and jonmarkgo authored Jan 2, 2025
1 parent 201008e commit 50e37fa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/schools_updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ jobs:
- name: Filter JSON to only include school names and save as school.csv
run: |
# Add first line to CSV file
echo "\"Below is a list of all schools that we've manually verified. If you see one that hasn't been included, please add it via my.mlh.io and we'll verify it soon.\"" > schools.csv
CURRENT_TIMESTAMP=$(date +"%Y-%m-%d %H:%M:%S")
echo "\"Below is a list of all schools that we've manually verified. If you see one that hasn't been included, please add it via my.mlh.io and we'll verify it soon. List last updated at: $CURRENT_TIMESTAMP.\"" > schools.csv
# Extract only the "name" field from each entry and overwrite data.json
jq -r '.[].name' data.json >> schools.csv
# Wrap each "name" in an array to use @csv for correct CSV formatting
jq -r '.[].name | [.] | @csv' data.json >> schools.csv
Expand Down

0 comments on commit 50e37fa

Please sign in to comment.