Skip to content

Commit

Permalink
Add usage
Browse files Browse the repository at this point in the history
  • Loading branch information
reemo3dp committed Jan 24, 2024
1 parent 0661ff1 commit 89bd468
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Klipper Log Tool

Parses the log and only returns important information for debugging

## Upload the last start to a pastebin

```bash
bash <(curl -sSL https://raw.githubusercontent.com/reemo3dp/klipper_log_tool/main/klipper_log_tool.sh) --upload
```

## Upload all starts minus the noise to a pastebin

```bash
bash <(curl -sSL https://raw.githubusercontent.com/reemo3dp/klipper_log_tool/main/klipper_log_tool.sh) --upload --all-starts
```

## Upload a klippy.log other than the default (~/printer_data/logs/klippy.log)

```bash
bash <(curl -sSL https://raw.githubusercontent.com/reemo3dp/klipper_log_tool/main/klipper_log_tool.sh) --upload --all-starts /home/pi/klippy.log
```

## Only de-noise the input

```bash
bash <(curl -sSL https://raw.githubusercontent.com/reemo3dp/klipper_log_tool/main/klipper_log_tool.sh) --all-starts /home/pi/klippy.log
```
4 changes: 3 additions & 1 deletion klipper_log_tool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ if [[ $# -eq 0 ]]; then
echo >&2 "No file specified and default file $FILE does not exist."
usage
fi
else
FILE="$1"
fi

set -u
Expand Down Expand Up @@ -85,7 +87,7 @@ process_klipper_log() {
remove_noise
}

OUTPUT=$(process_klipper_log "$1")
OUTPUT=$(process_klipper_log "$FILE")
echo "$OUTPUT"

if [[ $UPLOAD -eq 1 ]]; then
Expand Down

0 comments on commit 89bd468

Please sign in to comment.