You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, apologies if this is a little cheeky, but I need a similar kind of plugin and I wondered if you could give me some direction or maybe even help (I am a coder, but I have never done an Octoprint plugin before).
I have an IDEX printer and want a plugin that will change all instances of E0 to E1 - such that, if I have a GCode file which is sliced for Extruder 1, instead have it print using Extruder 2 (Because the filament I want is already loaded into extruder 2).
Your plugin already does a lot more complex stuff - I just need to work out what bits I need to change to make it a unique plugin, and where my entry point is. I guess essentially what you are doing is registering some hook - you get passed each line of Gcode and do some string manipulation, then write it out.
If you could give me a leg up, I would really appreciate it.
The text was updated successfully, but these errors were encountered:
Depending on what exactly you want, I would actually recommend you look at a different plugin of mine, because this one is a bit funky. I made this plugin to explore accelerating the file preprocessing by using C++ instead of native python.
If you want this to process all files uploaded then you can do this with a preprocessor hook "octoprint.filemanager.preprocessor": __plugin_implementation__.createFilePreProcessor,, which should point to a class that extends octoprint.filemanager.util.LineProcessorStream and importantly implements a process_line function. The actual function can probably be a single line of regex.
Otherwise, if you want similar UI functionality to how this plugin works (buttons in the file manager that launch a popup, then processing), I would suggest you clone/fork my repo and just tweak what you need to make it yours (rename things, change icons, rework the UI to have a swap from and swap to extruder setting, and rewrite the body of the TranslateWorker class to do your file translation).
Hi, apologies if this is a little cheeky, but I need a similar kind of plugin and I wondered if you could give me some direction or maybe even help (I am a coder, but I have never done an Octoprint plugin before).
I have an IDEX printer and want a plugin that will change all instances of
E0
toE1
- such that, if I have a GCode file which is sliced for Extruder 1, instead have it print using Extruder 2 (Because the filament I want is already loaded into extruder 2).Your plugin already does a lot more complex stuff - I just need to work out what bits I need to change to make it a unique plugin, and where my entry point is. I guess essentially what you are doing is registering some hook - you get passed each line of Gcode and do some string manipulation, then write it out.
If you could give me a leg up, I would really appreciate it.
The text was updated successfully, but these errors were encountered: