Skip to content

Setup analysis script on Linux

Sven Lohrmann edited this page Oct 31, 2021 · 4 revisions

This guide expects that you are using Slic3r, but it should also work with other slicers.

Installation

Install the required dependencies of click and yaml using your package manager, e.g.

$ sudo pacman -Syu python-click python-yaml

Now create the directory and download the scripts:

$ mkdir -p ~/.Slic3r/scripts/gcode_metadata
$ cd ~/.Slic3r/scripts/gcode_metadata
$ wget https://raw.githubusercontent.com/malnvenshorn/OctoPrint-MetadataPreprocessor/master/scripts/analysis.py
$ wget https://raw.githubusercontent.com/malnvenshorn/OctoPrint-MetadataPreprocessor/master/scripts/generate_metadata_example.sh
$ chmod +x generate_metadata_example.sh

Rename the generate_metadata_example.sh script to whatever you like and modify it to your needs, e.g. modifying the script path or command arguments.

When running the script for the first time it will automatically download the gcodeInterpreter from the OctoPrint source which is required to analyse the gcode. You can also manually download the file and and place it in the same directory as the other scripts, e.g. ~/.Slic3r/scripts/gcode_metadata. The update behavior can be configured using the update.yaml file.

Slic3r

You can easily integrate the analysis script in your workflow with Slic3r. Simply add the absolute path of the script under the post-processing scripts option.

Slic3r

Clone this wiki locally