Skip to content

Commit

Permalink
Merge pull request #87 from kvikindi/patch-2
Browse files Browse the repository at this point in the history
Update manual.md
  • Loading branch information
Tylerjet authored Mar 17, 2024
2 parents cf4b015 + 7129a89 commit 6a54831
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions docs/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,25 @@ A klipper macro can look like this:
```yaml
[gcode_macro update_git]
gcode:
RUN_SHELL_COMMAND CMD=update_git_script
{% set message = params.MESSAGE|default() %}
{% if message %}
RUN_SHELL_COMMAND CMD=update_git_script_message PARAMS="'{params.MESSAGE}'"
{% else %}
RUN_SHELL_COMMAND CMD=update_git_script
{% endif %}

[gcode_shell_command update_git_script]
command: bash -c "bash $HOME/klipper-backup/script.sh"
timeout: 90.0
verbose: True

[gcode_shell_command update_git_script_message]
command: bash -c "bash $HOME/klipper-backup/script.sh $0"
timeout: 90.0
verbose: True

```
![klipper-backup-macro-image](https://i.imgur.com/UglWf6t.png)
For a custom commit message using the klipper macro in console, type `update_git MESSAGE="YourMessage"`.
***
![klipper-backup-macro-image](https://i.imgur.com/UglWf6t.png)

0 comments on commit 6a54831

Please sign in to comment.