Created
August 7, 2025 11:38
-
-
Save sihil/24a0ca14d5af9fbb1080db1d6035984c to your computer and use it in GitHub Desktop.
Wrapper script for gcode-cli to estimate remaining time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
FILE=${1} | |
if [ ! -f "${FILE}" ]; then | |
echo "File ${FILE} not found!" | |
exit 1 | |
fi | |
# get the number of lines in the file | |
LINES=$(wc -l < "${FILE}") | |
# now plot with a progress bar | |
gcode-cli/gcode-cli "$FILE" /dev/ttyACM0,b115200 2>&1 | grep "<< OK" | pv -W -l -s "${LINES}" -pte > /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment