From 9343fa7728cdc09a9ea8d363c8bf6f46ac5cae36 Mon Sep 17 00:00:00 2001 From: bitscuit Date: Sun, 7 Mar 2021 14:38:05 +0100 Subject: [PATCH] Added copyright notice --- main.py | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 38b800c..579360b 100644 --- a/main.py +++ b/main.py @@ -5,7 +5,22 @@ import math print("PrintBuddy V0.1") -print("Made by Thomas Van Acker") +print(""" +Copyright (C) 2021 Thomas Van Acker + +This program comes with ABSOLUTELY NO WARRANTY. + +This program is free software: you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation, either version 3 of the License, or (at your option) any later +version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with +this program. If not, see .""") print("") # Static var init @@ -163,7 +178,7 @@ while True: gcodeLines = gcodeRaw.split("\n") # Iterate through all lines to get info - gcodeLines = 0 + gcodeLines = 0 for l in range(len(gcodeLines)): line = gcodeLines[l] @@ -171,8 +186,8 @@ while True: # When comment if line.startswith(";LAYER:"): l = int(line[line.index(":") +1:]) - if l > gcodeLayers: - gcodeLayers = l + if l > gcodeLayers: + gcodeLayers = l print("#Layers: %d"%gcodeLayers) print("%d lines"%len(gcodeLines))