Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Script for check slides availability for SotM 2018
#!/bin/bash
#
# Run this script inside the openstreetmap/stateofthemap-2018 repository
rm -f slides.csv
(for talk in _posts/schedule/*.md; do
slide=$(basename $talk .md | cut -d'-' -f4-)
echo -n $slide
for field in "time" "room" "authors"; do
echo -n ,$(sed -nr "s/$field: \"(.*)\"/\1/p" $talk | tr -d ',')
done
grep -q slides: $talk && echo ",available," || echo ",missing,"
done) >> slides.csv
sed -i 's/\(Saturday\)/28 \1/;s/\(Sunday\)/29 \1/;s/\(Monday\)/30 \1/;' slides.csv
sort -k2 -t',' slides.csv -o slides.csv
sed -i '1 i\Talk,Time,Room,Authors,Slides status,Notes' slides.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.