Skip to content

Commit

Permalink
Fix colorize command (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
LoneGit authored Jun 11, 2024
1 parent e24c099 commit 3945f31
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions src/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,22 @@ def settings_file_default():
def settings_file_old():
return path.join(PathBuilder.project_path(), "settings_old.yaml")

@staticmethod
def get_cmd_with_path(cmd):
temp_settings = prepare_temp_settings(sett())
encoded_temp_settings = base64.b64encode(temp_settings.encode("utf-8")).decode(
"utf-8"
)
return (
cmd
+ f'"{PathBuilder.settings_file_temp()}"'
+ " --data="
+ f"{encoded_temp_settings}"
)

@staticmethod
def colorizer_cmd():
return sett().colorizer.cmd + f'"{PathBuilder.settings_file()}"'
return PathBuilder.get_cmd_with_path(sett().colorizer.cmd)

@staticmethod
def colorizer_stl():
Expand All @@ -402,16 +415,7 @@ def colorizer_result():

@staticmethod
def slicing_cmd():
temp_settings = prepare_temp_settings(sett())
encoded_temp_settings = base64.b64encode(temp_settings.encode("utf-8")).decode(
"utf-8"
)
return (
sett().slicing.cmd
+ f'"{PathBuilder.settings_file_temp()}"'
+ " --data="
+ f"{encoded_temp_settings}"
)
return PathBuilder.get_cmd_with_path(sett().slicing.cmd)

@staticmethod
def gcodevis_file():
Expand Down

0 comments on commit 3945f31

Please sign in to comment.