Skip to content

Instantly share code, notes, and snippets.

@uschille
Created April 13, 2023 22:21
Show Gist options
  • Save uschille/ac8b00112376b14075f23922c5c99afb to your computer and use it in GitHub Desktop.
Save uschille/ac8b00112376b14075f23922c5c99afb to your computer and use it in GitHub Desktop.
Shell script for extracting and checking code in Carpentries episodes
#!/bin/sh
# uses @bobturneruk's extract_code.py: https://gist.github.com/bobturneruk/dfccd3d6ce5af7545c4a1159ce4724e8
for file in $(ls _episodes/*.md); do
echo "Checking Python code in ${file}"
python extract_code.py $file > /dev/null
python _episodes/$(basename -s .md $file).py > /dev/null
rm _episodes/$(basename -s .md $file).py
done
git clean -f data/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment