removed test group
parent
c069bec1fa
commit
ab82b6c733
|
@ -1,105 +0,0 @@
|
|||
{
|
||||
"category": "Janex",
|
||||
"name": "Produktionstask 2",
|
||||
"globalInputs": [
|
||||
{
|
||||
"parameterName": "kundenname",
|
||||
"type": "text",
|
||||
"displayName": "Name des Kunden2"
|
||||
},
|
||||
{
|
||||
"parameterName": "kiste",
|
||||
"type": "number",
|
||||
"displayName": "Nummer der Kiste"
|
||||
},
|
||||
{
|
||||
"parameterName": "kiste2",
|
||||
"type": "textarea",
|
||||
"displayName": "Nummer der zweiten Kiste yooo"
|
||||
}
|
||||
],
|
||||
"tasks": [
|
||||
{
|
||||
"name": "Bild zu Label konvertieren",
|
||||
"onFinish": "pause",
|
||||
"undoPossible": true,
|
||||
"repeatPossible": true,
|
||||
"scriptPath": "test1.py",
|
||||
"parameters": [
|
||||
{
|
||||
"parameterName": "labelformat",
|
||||
"type": "text",
|
||||
"displayName": "Format des Labels",
|
||||
"global": false
|
||||
},
|
||||
{
|
||||
"parameterName": "kiste",
|
||||
"type": "number",
|
||||
"displayName": "Nummer der Kiste",
|
||||
"global": true
|
||||
},
|
||||
{
|
||||
"parameterName": "kiste2",
|
||||
"type": "textarea",
|
||||
"displayName": "Nummer der zweiten Kiste lul",
|
||||
"global": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Label drucken",
|
||||
"onFinish": "next",
|
||||
"undoPossible": false,
|
||||
"repeatPossible": false,
|
||||
"scriptPath": "test2.py",
|
||||
"parameters": []
|
||||
},
|
||||
{
|
||||
"name": "Label drucken1",
|
||||
"onFinish": "next",
|
||||
"undoPossible": false,
|
||||
"repeatPossible": false,
|
||||
"scriptPath": "test2.py",
|
||||
"parameters": []
|
||||
},
|
||||
{
|
||||
"name": "Label drucken2",
|
||||
"onFinish": "next",
|
||||
"undoPossible": false,
|
||||
"repeatPossible": false,
|
||||
"scriptPath": "test2.py",
|
||||
"parameters": []
|
||||
},
|
||||
{
|
||||
"name": "Label drucken3",
|
||||
"onFinish": "next",
|
||||
"undoPossible": false,
|
||||
"repeatPossible": false,
|
||||
"scriptPath": "test2.py",
|
||||
"parameters": []
|
||||
},
|
||||
{
|
||||
"name": "Label 1",
|
||||
"onFinish": "next",
|
||||
"undoPossible": false,
|
||||
"repeatPossible": false,
|
||||
"scriptPath": "test2.py",
|
||||
"parameters": [
|
||||
{
|
||||
"parameterName": "kundenname",
|
||||
"type": "text",
|
||||
"displayName": "Name des Kunden",
|
||||
"global": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Label 2",
|
||||
"onFinish": "pause",
|
||||
"undoPossible": false,
|
||||
"repeatPossible": true,
|
||||
"scriptPath": "test3.py",
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
matplotlib==3.7.2
|
||||
numpy==1.24.3
|
||||
numpy_stl==3.0.1
|
||||
Pillow==10.0.0
|
|
@ -1,116 +0,0 @@
|
|||
import random
|
||||
from PIL import Image, ImageDraw
|
||||
import time
|
||||
import sys
|
||||
import numpy as np
|
||||
from stl import mesh
|
||||
|
||||
time.sleep(3)
|
||||
|
||||
labelformat = sys.argv[1]
|
||||
kiste = sys.argv[2]
|
||||
|
||||
|
||||
if len(sys.argv) >= 5:
|
||||
undo = sys.argv[4]
|
||||
|
||||
if undo == "--undo":
|
||||
print("finish undo")
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
print("hello this is test1")
|
||||
|
||||
if labelformat is None or kiste is None:
|
||||
sys.exit(100)
|
||||
|
||||
print("hello friend", labelformat, kiste)
|
||||
|
||||
fp = open("customers.txt", "w")
|
||||
fp.write("first line hey customer")
|
||||
fp.close()
|
||||
|
||||
# Bildgröße und Pixelgröße festlegen
|
||||
width = 100
|
||||
height = 100
|
||||
line_thickness = 5
|
||||
max_lines = 5
|
||||
|
||||
# Das Bildgröße anpassen
|
||||
image_width = width * line_thickness
|
||||
image_height = height * line_thickness
|
||||
|
||||
# Hintergrundfarbe festlegen
|
||||
background_color = (255, 255, 255) # Weiß
|
||||
|
||||
for i in range(10):
|
||||
# Ein neues Bild erstellen
|
||||
image = Image.new("RGB", (image_width, image_height), background_color)
|
||||
|
||||
# Eine Zeichenfläche für das Bild erstellen
|
||||
draw = ImageDraw.Draw(image)
|
||||
|
||||
# Zufällige Linien zeichnen
|
||||
for _ in range(max_lines):
|
||||
start_x = random.randint(0, image_width)
|
||||
start_y = random.randint(0, image_height)
|
||||
end_x = random.randint(0, image_width)
|
||||
end_y = random.randint(0, image_height)
|
||||
|
||||
color = (random.randint(0, 255), random.randint(
|
||||
0, 255), random.randint(0, 255))
|
||||
draw.line([(start_x, start_y), (end_x, end_y)],
|
||||
fill=color, width=line_thickness)
|
||||
|
||||
# Bild als Datei speichern
|
||||
image.save("generiertes_bild"+str(i)+".jpg")
|
||||
|
||||
# Abmessungen des rechteckigen Modells
|
||||
width = 196
|
||||
height = 196
|
||||
depth = 26
|
||||
|
||||
# Eckpunkte des Modells erstellen
|
||||
vertices = np.array([
|
||||
[0, 0, 0],
|
||||
[width, 0, 0],
|
||||
[width, height, 0],
|
||||
[0, height, 0],
|
||||
[0, 0, depth],
|
||||
[width, 0, depth],
|
||||
[width, height, depth],
|
||||
[0, height, depth]
|
||||
])
|
||||
|
||||
# Flächen des Modells definieren
|
||||
faces = np.array([
|
||||
[0, 1, 2],
|
||||
[0, 2, 3],
|
||||
[0, 1, 5],
|
||||
[0, 4, 5],
|
||||
[0, 3, 7],
|
||||
[0, 4, 7],
|
||||
[1, 2, 6],
|
||||
[1, 5, 6],
|
||||
[2, 3, 7],
|
||||
[2, 6, 7],
|
||||
[4, 5, 6],
|
||||
[4, 6, 7]
|
||||
])
|
||||
|
||||
# Erstellen des Modells mit den Eckpunkten und Flächen
|
||||
rectangular_mesh = mesh.Mesh(np.zeros(faces.shape[0], dtype=mesh.Mesh.dtype))
|
||||
for i, face in enumerate(faces):
|
||||
for j, vertex_id in enumerate(face):
|
||||
rectangular_mesh.vectors[i][j] = vertices[vertex_id]
|
||||
|
||||
# Exportieren des Modells als .stl-Datei
|
||||
rectangular_mesh.save('rectangular_model.stl')
|
||||
print("Das 3D-Modell wurde erfolgreich als 'rectangular_model.stl' exportiert.")
|
||||
|
||||
"""
|
||||
try:
|
||||
x = 5 / 0 # Hier wird ein Fehler ausgelöst
|
||||
except ZeroDivisionError:
|
||||
print("Ein Fehler ist aufgetreten: Division durch Null.")
|
||||
raise SystemExit(140) """
|
|
@ -1,32 +0,0 @@
|
|||
import time
|
||||
import sys
|
||||
import random
|
||||
import string
|
||||
import zipfile
|
||||
|
||||
time.sleep(5)
|
||||
|
||||
print("hello this is test2 lul")
|
||||
|
||||
|
||||
def generate_random_text(length):
|
||||
"""Generiert einen zufälligen Text mit der angegebenen Länge"""
|
||||
letters = string.ascii_lowercase
|
||||
return ''.join(random.choice(letters) for _ in range(length))
|
||||
|
||||
|
||||
def create_zip_file(file_name, text_length):
|
||||
"""Erstellt eine Zip-Datei mit einer Textdatei mit zufälligem Text"""
|
||||
random_text = generate_random_text(text_length)
|
||||
|
||||
with open('random_text.txt', 'w') as file:
|
||||
file.write(random_text)
|
||||
|
||||
with zipfile.ZipFile(file_name, 'w') as zip_file:
|
||||
zip_file.write('random_text.txt')
|
||||
|
||||
print(f'Die Zip-Datei "{file_name}" wurde erfolgreich erstellt.')
|
||||
|
||||
|
||||
# Beispielaufruf
|
||||
create_zip_file('random_text.zip', 100)
|
|
@ -1,47 +0,0 @@
|
|||
import sys
|
||||
import random
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
|
||||
def create_avatar(size):
|
||||
# Erstelle ein neues Plot-Fenster
|
||||
fig, ax = plt.subplots()
|
||||
fig.set_size_inches(size/100, size/100) # Größe des Fensters festlegen
|
||||
|
||||
# Generiere zufällige Farben für Hintergrund und Formen
|
||||
bg_color = (random.random(), random.random(), random.random())
|
||||
shape_color = (random.random(), random.random(), random.random())
|
||||
|
||||
# Setze den Hintergrund
|
||||
ax.set_facecolor(bg_color)
|
||||
|
||||
# Zeichne zufällige Formen
|
||||
num_shapes = random.randint(3, 6)
|
||||
for _ in range(num_shapes):
|
||||
shape_type = random.choice(['circle', 'rectangle'])
|
||||
if shape_type == 'circle':
|
||||
x = random.randint(0, size)
|
||||
y = random.randint(0, size)
|
||||
radius = random.randint(0, size // 2)
|
||||
circle = plt.Circle((x, y), radius, fc=shape_color)
|
||||
ax.add_patch(circle)
|
||||
elif shape_type == 'rectangle':
|
||||
x = random.randint(0, size)
|
||||
y = random.randint(0, size)
|
||||
width = random.randint(0, size // 2)
|
||||
height = random.randint(0, size // 2)
|
||||
rectangle = plt.Rectangle((x, y), width, height, fc=shape_color)
|
||||
ax.add_patch(rectangle)
|
||||
|
||||
# Verstecke Achsenbeschriftungen
|
||||
ax.axis("off")
|
||||
|
||||
# Speichere das Bild
|
||||
plt.savefig("random_avatar.png", dpi=100)
|
||||
plt.close()
|
||||
|
||||
|
||||
# Beispielaufruf
|
||||
create_avatar(400)
|
||||
|
||||
print("hello")
|
|
@ -139,6 +139,7 @@ func ReloadCategoryGroups(category string) {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
func LookingForCategoryGroupChanges(userId string) {
|
||||
entries, err := os.ReadDir(config.Cfg.FolderPaths.GroupTasksGroups)
|
||||
|
||||
|
@ -262,7 +263,7 @@ func LookingForCategoryGroupChanges(userId string) {
|
|||
})},
|
||||
},
|
||||
})
|
||||
}
|
||||
} */
|
||||
|
||||
func isInList(value string, list []string) bool {
|
||||
for _, x := range list {
|
||||
|
|
|
@ -90,7 +90,6 @@ const (
|
|||
SentCmdInstallingGlobalPythonPackagesFailed = 37
|
||||
SentCmdInstallingGlobalPythonPackagesFinished = 38
|
||||
SentCmdUpdateUsers = 39
|
||||
SentCmdCheckingForGroupTasksCategoryGroupChanges = 40
|
||||
SentCmdNewNotification = 41
|
||||
SentCmdAllNotificationsDeleted = 42
|
||||
SentCmdOneNotificationDeleted = 43
|
||||
|
@ -115,7 +114,6 @@ const (
|
|||
ReceivedCmdAllUsersUserDeactivation = 14
|
||||
ReceivedCmdScannersUseScanners = 15
|
||||
ReceivedCmdScannersDisconnectScanner = 16
|
||||
ReceivedCmdGroupTasksCheckingForCategoryGroupChanges = 17
|
||||
ReceivedCmdHandleUserActionTaskStep = 18
|
||||
ReceivedCmdCreateNewUserApiKey = 19
|
||||
ReceivedCmdDeleteUserApiKey = 20
|
||||
|
|
|
@ -308,20 +308,6 @@ func RunHub() {
|
|||
|
||||
socketclients.ScannersUpdateScannerUsedByUserId("", receivedMessage.Body["ScannerId"].(string))
|
||||
break
|
||||
case utils.ReceivedCmdGroupTasksCheckingForCategoryGroupChanges:
|
||||
if !socketclients.HasPermission(data.Conn.Locals("userId").(string), utils.PermissionGroupTasksCheckingForCategoryGroupChanges) {
|
||||
socketclients.SendErrorMessageNoPermissions(data.Conn.Locals("sessionId").(string))
|
||||
break
|
||||
}
|
||||
|
||||
socketclients.BroadcastMessageToTopic(
|
||||
utils.SubscribedDynamicTopicGroupTasks,
|
||||
structs.SendSocketMessage{
|
||||
Cmd: utils.SentCmdCheckingForGroupTasksCategoryGroupChanges,
|
||||
})
|
||||
|
||||
grouptasks.LookingForCategoryGroupChanges(data.Conn.Locals("userId").(string))
|
||||
break
|
||||
case utils.ReceivedCmdHandleUserActionTaskStep:
|
||||
if !socketclients.HasXYPermission(data.Conn.Locals("userId").(string), utils.PermissionGroupTasksOverviewXYReloadGroupConfig, receivedMessage.Body["category"].(string)) {
|
||||
socketclients.SendErrorMessageNoPermissions(data.Conn.Locals("sessionId").(string))
|
||||
|
|
Loading…
Reference in New Issue