- Create the following three files:
/etc/systemd/system/caps-to-ctrl.service
[Service]
ExecStart=/usr/local/bin/caps-to-ctrl.sh
[Install]
WantedBy=default.target
#!/bin/bash | |
# Find staged files | filter for notebooks | substitute spaces for newlines | |
notebooks=$( git diff --staged --name-only | grep .ipynb | tr '\n' ' ') | |
# If there are staged notebooks, clear them and re-add them | |
if [ -n "$notebooks" ]; then | |
jupyter nbconvert --ClearOutputPreprocessor.enabled=True --inplace $notebooks | |
git add $notebooks | |
fi |
/etc/systemd/system/caps-to-ctrl.service
[Service]
ExecStart=/usr/local/bin/caps-to-ctrl.sh
[Install]
WantedBy=default.target
I hereby claim:
To claim this, I am signing this object: