Skip to content

Commit

Permalink
Update SearchAndReplace.py
Browse files Browse the repository at this point in the history
Update a description

Update SearchAndReplace.py

Fixed the "descriptions".  Cura didn't like the dashes or backslashes.
  • Loading branch information
GregValiant committed Jan 7, 2025
1 parent ee61854 commit 349c528
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions plugins/PostProcessingPlugin/scripts/SearchAndReplace.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Copyright (c) 2017 Ghostkeeper
# The PostProcessingPlugin is released under the terms of the LGPLv3 or higher.
# Altered by GregValiant (Greg Foresi) February, 2023.
# Added an option to replace the 'First Instance Only'
# Added option to limit the Search to a layer range.
# Added option for a layer search with a Start Layer and an End layer.
# Added 'Ignore StartUp G-code' and 'Ignore Ending G-code' options

import re
Expand Down Expand Up @@ -31,21 +30,21 @@ def getSettingDataString(self):
"replace":
{
"label": "Replace with:",
"description": "The 'Search For' text will get replaced by this text. For Multi-Line insertions use the newline character 'backslash plus n' as the delimiter. Also for multi-line insertions the last character must be 'backslash plus n'",
"description": "The 'Search For' text will get replaced by this text. For MultiLine insertions use the newline character 'backslash plus n' as the delimiter. If your Search term ends with a 'newline' remember to add 'newline' to the end of this Replace term.",
"type": "str",
"default_value": ""
},
"is_regex":
{
"label": "Use Regular Expressions",
"description": "When disabled the search string is treated as a simple text string. When enabled, the search text will be re-compiled as a 'regular' python expression.",
"description": "When disabled the search string is treated as a simple text string. When enabled, the search text will be recompiled as a 'regular' python expression.",
"type": "bool",
"default_value": false
},
"enable_layer_search":
{
"label": "Enable search within a Layer Range:",
"description": "When enabled, You can choose a Start and End layer for the search. When 'Layer Search' is enabled the StartUp and Ending g-codes are always ignored.",
"description": "When enabled, You can choose a Start and End layer for the search. When 'Layer Search' is enabled the StartUp and Ending gcodes are always ignored.",
"type": "bool",
"default_value": false,
"enabled": true
Expand Down Expand Up @@ -79,15 +78,15 @@ def getSettingDataString(self):
"ignore_start":
{
"label": "Ignore StartUp G-code:",
"description": "When enabled the StartUp G-code is unaffected. The StartUp G-code is everything from ';generated with Cura...' to ';LAYER_COUNT:' inclusive.",
"description": "When enabled the StartUp Gcode is unaffected. The StartUp Gcode is everything from ';generated with Cura...' to ';LAYER_COUNT:' inclusive.",
"type": "bool",
"default_value": true,
"enabled": "not enable_layer_search"
},
"ignore_end":
{
"label": "Ignore Ending G-code:",
"description": "When enabled the Ending G-code is unaffected.",
"description": "When enabled the Ending Gcode is unaffected.",
"type": "bool",
"default_value": true,
"enabled": "not enable_layer_search"
Expand Down

0 comments on commit 349c528

Please sign in to comment.