Skip to content

Commit

Permalink
Merge pull request #3 from ChristopherHoffman/master
Browse files Browse the repository at this point in the history
Merge Master into Main
  • Loading branch information
ChristopherHoffman authored Nov 17, 2024
2 parents 1e602a0 + 5c98d59 commit d68d8ef
Show file tree
Hide file tree
Showing 28 changed files with 1,550 additions and 102 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI

on: [push]

env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1

jobs:
build:
name: ${{ matrix.platform.name }} ${{ matrix.dotnet.name }}
runs-on: ${{ matrix.platform.os }}

strategy:
fail-fast: false
matrix:
platform:
- {
name: Linux,
os: ubuntu-latest,
filepath: "/home/runner/work/Slic3rPostProcessingUploader/Slic3rPostProcessingUploader/Slic3rPostProcessingUploader/bin/Release/net8.0/linux-x64/publish/",
}
- {
name: Windows VS2022,
os: windows-latest,
filepath: "D:\\a\\Slic3rPostProcessingUploader\\Slic3rPostProcessingUploader\\Slic3rPostProcessingUploader\\bin\\Release\\net8.0\\win-x64\\publish\\",
}
- {
name: MacOS,
os: macos-latest,
filepath: "/Users/runner/work/Slic3rPostProcessingUploader/Slic3rPostProcessingUploader/Slic3rPostProcessingUploader/bin/Release/net8.0/osx-arm64/publish/",
}
dotnet:
- { name: .NET 8, version: "8.0.x", filepath: "net8.0" }

steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup .NET ${{ matrix.dotnet.version }} SDK
id: setup-dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet.version }}
- name: Enforce SDK Version
run: dotnet new globaljson --sdk-version ${{ steps.setup-dotnet.outputs.dotnet-version }} --force
- name: Verify SDK Installation
run: dotnet --info
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal
- name: Publish
run: dotnet publish --configuration Release
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: publish-${{ matrix.platform.name }}-${{ matrix.dotnet.name }}
path: ${{ matrix.platform.filepath }}
87 changes: 0 additions & 87 deletions Program.cs

This file was deleted.

103 changes: 101 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,102 @@
# Slic3rPostProcessingUploader
# Slic3r Post-Processing Uploader for 3D Print Log

A Slic3r/PrusaSlicer/OrcaSlicer/Bambu Studio Post-Processing script for uploading print details to https://www.3dprintlog.com
A Slic3r/PrusaSlicer/OrcaSlicer/Bambu Studio Post-Processing script for uploading print details to https://www.3dprintlog.com.

This program will parse the gcode file and open up https://www.3dprintlog.com with the print details filled out.

Create a free account at https://www.3dprintlog.com today and enjoy all the features.

## Currently Supported Slicers:

This is a new project, currently a work in progress. Feel free to help out by submitting requests, bug reports, or helping to make Pull Requests.

- OrcaSlicer

#### Up Next:

- PrusaSlicer
- Bambu Studio
- Super Slicer

## Usage:

Usage: In the Slicer's 'Post-Processing Scripts' section, add the path to this file

`Slic3rPostProcessingUploader.exe [options]`

## Options:

`--help`, `-h`: Display this help message. No settings will be uploaded if help is displayed.

`--local-dev`: Use the local development environment

`--debug <path>`: Save debug information to the specified path

`--opt-out-telemetry`: Disable telemetry tracking. To help improve the plugin, we track slicer and plugin versions, as well as log errors that are thrown. No personal data is collected.

### Note Template Options:

`--default`: Use the default note template, which contains a curated list of general settings. Preferred by most users. The Default template is used if no other note template option is given.

`--full`: Use the full note template, which lists most of the settings available in the slicers

`--template <path>`: Use a custom note template. Absolute paths work better. See README for more details on syntax

## Example

In your Slicer's Post Processing text box, input:

`Slic3rPostProcessingUploader --default`

Once you slice your object and export the `.gcode` file, this plugin will run and open your default web browser to https://www.3dprintlog.com with all of the print details and settings filled out.

## Note Templates

If the provided `default` or `full` templates are not to your liking, you can create custom note templates by passing in the path to a text file containing the template. These can look for specific settings in the gcode file, and pull out the data.

Example:
`Slic3rPostProcessingUploader --template "C:\tmp\my-custom-template.txt"`

### Template Syntax

Any plain text will be displayed as-is in the note.

You can use `{{setting_name}}` to identify settings from the gcode file to use. This program will then look for `; setting_name = some value`, and replace `{{setting_name}}` with `some value`.

For example, OrcaSlicer's gcode files have a section at the bottom containing all the configuration like:

```
; CONFIG_BLOCK_START
; accel_to_decel_enable = 1
; accel_to_decel_factor = 50%
; activate_air_filtration = 0
; activate_chamber_temp_control = 0
; adaptive_bed_mesh_margin = 0
; adaptive_pressure_advance = 0
; adaptive_pressure_advance_bridges = 0
; adaptive_pressure_advance_model = "0,0,0\n0,0,0"
; adaptive_pressure_advance_overhangs = 0
...
```

If `my-custom-template.txt` contained the template:

```
This is my template.
I used these settings:
- Activate Air Filtration: {{activate_air_filtration}}
- Use Adaptive Pressure Advance: {{adaptive_pressure_advance}}
- Acceleration to Deceleration: {{accel_to_decel_factor}}
```

Then 3D Print Log will receive a note that is rendered like:

```
This is my template.
I used these settings:
- Activate Air Filtration: 0
- Use Adaptive Pressure Advance: 0
- Acceleration to Deceleration: 50%
```
12 changes: 0 additions & 12 deletions Slic3rPostProcessingUploader.csproj

This file was deleted.

8 changes: 7 additions & 1 deletion Slic3rPostProcessingUploader.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.9.34321.82
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Slic3rPostProcessingUploader", "Slic3rPostProcessingUploader.csproj", "{D191331F-9D96-4C48-BD68-3858D9577349}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Slic3rPostProcessingUploader", "Slic3rPostProcessingUploader\Slic3rPostProcessingUploader.csproj", "{D191331F-9D96-4C48-BD68-3858D9577349}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Slic3rPostProcessingUploaderUnitTests", "Slic3rPostProcessingUploaderUnitTests\Slic3rPostProcessingUploaderUnitTests.csproj", "{0B30144B-2EB1-4EA4-B416-FF0FC9954E55}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -15,6 +17,10 @@ Global
{D191331F-9D96-4C48-BD68-3858D9577349}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D191331F-9D96-4C48-BD68-3858D9577349}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D191331F-9D96-4C48-BD68-3858D9577349}.Release|Any CPU.Build.0 = Release|Any CPU
{0B30144B-2EB1-4EA4-B416-FF0FC9954E55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0B30144B-2EB1-4EA4-B416-FF0FC9954E55}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0B30144B-2EB1-4EA4-B416-FF0FC9954E55}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0B30144B-2EB1-4EA4-B416-FF0FC9954E55}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Loading

0 comments on commit d68d8ef

Please sign in to comment.