update product label for more dynamic
parent
b7e12600b6
commit
5e69bfa09e
|
@ -36,41 +36,41 @@
|
||||||
"type": "select",
|
"type": "select",
|
||||||
"displayName": "Produkttyp auswählen",
|
"displayName": "Produkttyp auswählen",
|
||||||
"options": [
|
"options": [
|
||||||
"#32420 Gizmo die Eidechse, Farbe, Grün/Blau/Orange (Glänzend)",
|
"#32420 Gizmo die Eidechse, Farbe, Grün/Blau/Orange, (Glänzend)",
|
||||||
"#83650 Gizmo die Eidechse, Farbe, Gold (Glänzend)",
|
"#83650 Gizmo die Eidechse, Farbe, Gold, (Glänzend)",
|
||||||
"#92784 Gizmo die Eidechse, Farbe, Glitzer Grün (Seidenmatt)",
|
"#92784 Gizmo die Eidechse, Farbe, Glitzer Grün, (Seidenmatt)",
|
||||||
"#36521 Charlie das Häschen, Farbe, Hellbraun (Matt)",
|
"#36521 Charlie das Häschen, Farbe, Hellbraun, (Matt)",
|
||||||
"#48273 Charlie das Häschen, Farbe, Gold (Glänzend)",
|
"#48273 Charlie das Häschen, Farbe, Gold, (Glänzend)",
|
||||||
"#71936 Ruby die Schlange, Farbe, Feuerrot (Glänzend)",
|
"#71936 Ruby die Schlange, Farbe, Feuerrot, (Glänzend)",
|
||||||
"#58324 Ruby die Schlange, Farbe, Rot/Blau (Glänzend)",
|
"#58324 Ruby die Schlange, Farbe, Rot/Blau, (Glänzend)",
|
||||||
"#78648 Ruby die Schlange, Farbe, Gold (Glänzend)",
|
"#78648 Ruby die Schlange, Farbe, Gold, (Glänzend)",
|
||||||
"#21433 Bruno der Dino, Farbe, Grün/Blau/Orange (Glänzend)",
|
"#21433 Bruno der Dino, Farbe, Grün/Blau/Orange, (Glänzend)",
|
||||||
"#57953 Bruno der Dino, Farbe, Rot/Blau (Glänzend)",
|
"#57953 Bruno der Dino, Farbe, Rot/Blau, (Glänzend)",
|
||||||
"#90578 Bruno der Dino, Farbe, Gold (Glänzend)",
|
"#90578 Bruno der Dino, Farbe, Gold, (Glänzend)",
|
||||||
"#51563 Bruno der Dino, Farbe, Himmelblau (Fluoreszierend)",
|
"#51563 Bruno der Dino, Farbe, Himmelblau, (Fluoreszierend)",
|
||||||
"#23564 Flamara der Drache, Farbe, Feuerrot (Glänzend)",
|
"#23564 Flamara der Drache, Farbe, Feuerrot, (Glänzend)",
|
||||||
"#51139 Flamara der Drache, Farbe, Himmelblau (Fluoreszierend)",
|
"#51139 Flamara der Drache, Farbe, Himmelblau, (Fluoreszierend)",
|
||||||
"#77970 Flamara der Drache, Farbe, Gold (Glänzend)",
|
"#77970 Flamara der Drache, Farbe, Gold, (Glänzend)",
|
||||||
"#43356 Flamara der Drache, Farbe, Schwarz",
|
"#43356 Flamara der Drache, Farbe, Schwarz, ",
|
||||||
"#32974 Finn der Sad Hamster, Stil, Standard / Weiblich",
|
"#32974 Finn der Sad Hamster, Stil, Standard, Weiblich",
|
||||||
"#60798 Finn der Sad Hamster, Stil, Schlüsselanhänger / Weiblich",
|
"#60798 Finn der Sad Hamster, Stil, Schlüsselanhänger, Weiblich",
|
||||||
"#30563 Finn der Sad Hamster, Stil, Groß / Weiblich",
|
"#30563 Finn der Sad Hamster, Stil, Groß, Weiblich",
|
||||||
"#90586 Finn der Sad Hamster, Stil, Standard / Männlich",
|
"#90586 Finn der Sad Hamster, Stil, Standard, Männlich",
|
||||||
"#99560 Finn der Sad Hamster, Stil, Schlüsselanhänger / Männlich",
|
"#99560 Finn der Sad Hamster, Stil, Schlüsselanhänger, Männlich",
|
||||||
"#47364 Finn der Sad Hamster, Stil, Groß / Männlich",
|
"#47364 Finn der Sad Hamster, Stil, Groß, Männlich",
|
||||||
"#93047 Mia das Kätzchen, Farbe, Grau",
|
"#93047 Mia das Kätzchen, Farbe, Grau, ",
|
||||||
"#86423 Mia das Kätzchen, Farbe, Weiß",
|
"#86423 Mia das Kätzchen, Farbe, Weiß, ",
|
||||||
"#X38764 Mia das Kätzchen, Farbe, Weiß (Schlüsselanhänger)",
|
"#X38764 Mia das Kätzchen, Farbe, Weiß, (Schlüsselanhänger)",
|
||||||
"#56083 Hoppel das Häschen, Farbe, Grau",
|
"#56083 Hoppel das Häschen, Farbe, Grau, ",
|
||||||
"#78693 Elias der Corgi, Farbe, Braun/Weiß",
|
"#78693 Elias der Corgi, Farbe, Braun/Weiß, ",
|
||||||
"#37335 Axel der Axolotl, Farbe, Pink",
|
"#37335 Axel der Axolotl, Farbe, Pink, ",
|
||||||
"#26822 Dilo der Delfin, Farbe, Blau ➔ Weiß",
|
"#26822 Dilo der Delfin, Farbe, Blau ➔ Weiß, ",
|
||||||
"#51665 Sunny das Einhorn, Farbe, Weiß",
|
"#51665 Sunny das Einhorn, Farbe, Weiß, ",
|
||||||
"#35717 Stella der Phönix, Farbe, Sonderanfertigung Rosa/Weiß",
|
"#35717 Stella der Phönix, Farbe, Sonderanfertigung, Rosa/Weiß",
|
||||||
"#26843 Stella der Phönix, Farbe, Verlauf Lila/Pink",
|
"#26843 Stella der Phönix, Farbe, Verlauf Lila/Pink, ",
|
||||||
"#74943 Brain der Fuchs, Stil, Standard",
|
"#74943 Brain der Fuchs, Stil, Standard, ",
|
||||||
"#78071 Weißer Hund, Stil, Weiß",
|
"#78071 Weißer Hund, Stil, Weiß, ",
|
||||||
"#92734 Amigo der Capybara, Farbe, Braun"
|
"#92734 Amigo der Capybara, Farbe, Braun, "
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -44,7 +44,7 @@ def update_grouptask_products_list_options(index_json_path, products_list):
|
||||||
# replace _ with " " just for better style in dashboard
|
# replace _ with " " just for better style in dashboard
|
||||||
product_name = product['name'].replace("_", " ")
|
product_name = product['name'].replace("_", " ")
|
||||||
|
|
||||||
option = f"#{product['id']} {product_name}, {product['product_variant']}, {product['product_color']}"
|
option = f"#{product['id']} {product_name}, {product['product_variant']}, {product['product_characteristic_line_1']}, {product['product_characteristic_line_2']}"
|
||||||
options_list.append(option)
|
options_list.append(option)
|
||||||
|
|
||||||
for task in data['tasks']:
|
for task in data['tasks']:
|
||||||
|
@ -73,7 +73,8 @@ def google_sheets_products():
|
||||||
rowIndexProductId = -1
|
rowIndexProductId = -1
|
||||||
rowIndexProductName = -1
|
rowIndexProductName = -1
|
||||||
rowIndexProductVariant = -1
|
rowIndexProductVariant = -1
|
||||||
rowIndexProductVariantCharacteristics = -1
|
rowIndexProductCharacteristicLine1 = -1
|
||||||
|
rowIndexProductCharacteristicLine2 = -1
|
||||||
rowIndexNameSplitAtPosition = -1
|
rowIndexNameSplitAtPosition = -1
|
||||||
|
|
||||||
for i in range(len(data[1])):
|
for i in range(len(data[1])):
|
||||||
|
@ -85,12 +86,14 @@ def google_sheets_products():
|
||||||
rowIndexProductName = i
|
rowIndexProductName = i
|
||||||
elif row == "Produktvariante":
|
elif row == "Produktvariante":
|
||||||
rowIndexProductVariant = i
|
rowIndexProductVariant = i
|
||||||
elif row == "Produktfarbe/Characteristics":
|
elif row == "Produktcharakteristik Zeile 1":
|
||||||
rowIndexProductVariantCharacteristics = i
|
rowIndexProductCharacteristicLine1 = i
|
||||||
|
elif row == "Produktcharakteristik Zeile 2":
|
||||||
|
rowIndexProductCharacteristicLine2 = i
|
||||||
elif row == "Name trennen bei Position":
|
elif row == "Name trennen bei Position":
|
||||||
rowIndexNameSplitAtPosition = i
|
rowIndexNameSplitAtPosition = i
|
||||||
|
|
||||||
if rowIndexProductId == -1 or rowIndexProductId == -1 or rowIndexProductName == -1 or rowIndexProductVariant == -1 or rowIndexProductVariantCharacteristics == -1:
|
if rowIndexProductId == -1 or rowIndexProductId == -1 or rowIndexProductName == -1 or rowIndexProductVariant == -1 or rowIndexProductCharacteristicLine1 == -1 or rowIndexProductCharacteristicLine2 == -1:
|
||||||
sys.exit("Failed to get row index. Please check if the row names are equal to the names of the google sheet table header")
|
sys.exit("Failed to get row index. Please check if the row names are equal to the names of the google sheet table header")
|
||||||
|
|
||||||
# adding products to list
|
# adding products to list
|
||||||
|
@ -103,7 +106,8 @@ def google_sheets_products():
|
||||||
"id": row[rowIndexProductId],
|
"id": row[rowIndexProductId],
|
||||||
"name": add_underscore_at_position(row[1], int(row[rowIndexNameSplitAtPosition])),
|
"name": add_underscore_at_position(row[1], int(row[rowIndexNameSplitAtPosition])),
|
||||||
"product_variant": row[rowIndexProductVariant],
|
"product_variant": row[rowIndexProductVariant],
|
||||||
"product_color": row[rowIndexProductVariantCharacteristics]
|
"product_characteristic_line_1": row[rowIndexProductCharacteristicLine1],
|
||||||
|
"product_characteristic_line_2": row[rowIndexProductCharacteristicLine2],
|
||||||
})
|
})
|
||||||
|
|
||||||
products_dict = {"products": products}
|
products_dict = {"products": products}
|
||||||
|
|
|
@ -62,8 +62,23 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.product-container {
|
||||||
|
top: -4px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
.product-variant {
|
.product-variant {
|
||||||
/* display: inline-block; */
|
font-weight: 600;
|
||||||
|
font-size: 10px;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
top: 4px;
|
||||||
|
position: relative;
|
||||||
|
color: #464646;
|
||||||
|
letter-spacing: 1.8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-characteristic {
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,10 +141,12 @@
|
||||||
<div class="label">
|
<div class="label">
|
||||||
<div class="background-image"></div>
|
<div class="background-image"></div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
<div class="product-container">
|
||||||
<h1>Gizmo</h1>
|
<h1>Gizmo</h1>
|
||||||
<h1 style="margin: 0">die Eidechse</h1>
|
<h1 style="margin: 0">die Eidechse</h1>
|
||||||
<p class="product-color">Grün/Blau/Orange</p>
|
<p class="product-characteristic">Grün/Blau/Orange</p>
|
||||||
<p class="product-color">(Glänzend)</p>
|
<p class="product-characteristic">(Glänzend)</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<p class="product-id">#32420</p>
|
<p class="product-id">#32420</p>
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,19 @@
|
||||||
const PRODUCT_NAME = "{{PRODUCT_NAME}}", // Gizmo die Eidechse
|
const PRODUCT_NAME = "{{PRODUCT_NAME}}", // Gizmo die Eidechse
|
||||||
PRODUCT_VARIANT = "{{PRODUCT_VARIANT}}", // Farbe Grün/Blau/Orange or Stil Standard
|
PRODUCT_VARIANT = "{{PRODUCT_VARIANT}}", // Farbe Grün/Blau/Orange or Stil Standard
|
||||||
PRODUCT_COLOR_CHARACTERISTICS = "{{PRODUCT_COLOR_CHARACTERISTICS}}", // (Glänzend)
|
PRODUCT_CHARACTERISTIC_LINE_1 = "{{PRODUCT_CHARACTERISTIC_LINE_1}}", // (Glänzend)
|
||||||
|
PRODUCT_CHARACTERISTIC_LINE_2 = "{{PRODUCT_CHARACTERISTIC_LINE_2}}",
|
||||||
PRODUCT_ID = "#{{PRODUCT_ID}}", // #32420
|
PRODUCT_ID = "#{{PRODUCT_ID}}", // #32420
|
||||||
LABEL_PAPER_POSITION = "{{LABEL_PAPER_POSITION}}"; // could be a number between 1 and 12 or combination like 1,3,7
|
LABEL_PAPER_POSITION = "{{LABEL_PAPER_POSITION}}"; // could be a number between 1 and 12 or combination like 1,3,7
|
||||||
|
/*
|
||||||
|
const PRODUCT_NAME = "Gizmo_die Eidechse",
|
||||||
|
PRODUCT_VARIANT = "FARBE",
|
||||||
|
PRODUCT_CHARACTERISTIC_LINE_1 = "Grün/Blau/Orange",
|
||||||
|
PRODUCT_CHARACTERISTIC_LINE_2 = "(Glänzend)",
|
||||||
|
PRODUCT_ID = "#32420",
|
||||||
|
LABEL_PAPER_POSITION = "1"; */
|
||||||
|
|
||||||
const labelPaperPosition = LABEL_PAPER_POSITION.split(",");
|
const labelPaperPosition = LABEL_PAPER_POSITION.split(",");
|
||||||
|
|
||||||
/*
|
|
||||||
const PRODUCT_NAME = "Gizmo die Eidechse",
|
|
||||||
PRODUCT_VARIANT = "Farbe Grün/Blau/Orange",
|
|
||||||
PRODUCT_COLOR_CHARACTERISTICS = "(Glänzend)",
|
|
||||||
PRODUCT_ID = "#32420"; */
|
|
||||||
|
|
||||||
window.onload = () => {
|
window.onload = () => {
|
||||||
for (let i = 1; i <= 12; i++) {
|
for (let i = 1; i <= 12; i++) {
|
||||||
let labels = document.getElementById("labels");
|
let labels = document.getElementById("labels");
|
||||||
|
@ -22,14 +24,15 @@ window.onload = () => {
|
||||||
label.className = "label";
|
label.className = "label";
|
||||||
|
|
||||||
if (labelPaperPosition.indexOf(i.toString()) !== -1) {
|
if (labelPaperPosition.indexOf(i.toString()) !== -1) {
|
||||||
/* FIRST */
|
|
||||||
|
|
||||||
const backgroundImage = document.createElement("div");
|
const backgroundImage = document.createElement("div");
|
||||||
backgroundImage.className = "background-image";
|
backgroundImage.className = "background-image";
|
||||||
|
|
||||||
const content = document.createElement("div");
|
const content = document.createElement("div");
|
||||||
content.className = "content";
|
content.className = "content";
|
||||||
|
|
||||||
|
const productContainer = document.createElement("div");
|
||||||
|
productContainer.className = "product-container";
|
||||||
|
|
||||||
const productName = PRODUCT_NAME.split("_");
|
const productName = PRODUCT_NAME.split("_");
|
||||||
|
|
||||||
const productNameFirst = document.createElement("h1");
|
const productNameFirst = document.createElement("h1");
|
||||||
|
@ -43,12 +46,16 @@ window.onload = () => {
|
||||||
productVariant.innerHTML = PRODUCT_VARIANT;
|
productVariant.innerHTML = PRODUCT_VARIANT;
|
||||||
productVariant.className = "product-variant";
|
productVariant.className = "product-variant";
|
||||||
|
|
||||||
const productColorCharacteristics = document.createElement("p");
|
const productCharacteristicLine1 = document.createElement("p");
|
||||||
productColorCharacteristics.innerHTML =
|
productCharacteristicLine1.innerHTML = PRODUCT_CHARACTERISTIC_LINE_1;
|
||||||
PRODUCT_COLOR_CHARACTERISTICS == ""
|
productCharacteristicLine1.className = "product-characteristic";
|
||||||
|
|
||||||
|
const productCharacteristicLine2 = document.createElement("p");
|
||||||
|
productCharacteristicLine2.innerHTML =
|
||||||
|
PRODUCT_CHARACTERISTIC_LINE_2 == ""
|
||||||
? "\u200B" // /* Zero-Width Space needed for product variants like Standard which have no color characteristics */
|
? "\u200B" // /* Zero-Width Space needed for product variants like Standard which have no color characteristics */
|
||||||
: PRODUCT_COLOR_CHARACTERISTICS;
|
: PRODUCT_CHARACTERISTIC_LINE_2;
|
||||||
productColorCharacteristics.className = "product-variant";
|
productCharacteristicLine2.className = "product-characteristic";
|
||||||
|
|
||||||
const productId = document.createElement("p");
|
const productId = document.createElement("p");
|
||||||
productId.innerHTML = PRODUCT_ID;
|
productId.innerHTML = PRODUCT_ID;
|
||||||
|
@ -56,8 +63,12 @@ window.onload = () => {
|
||||||
|
|
||||||
content.appendChild(productNameFirst);
|
content.appendChild(productNameFirst);
|
||||||
content.appendChild(productNameRemainingPart);
|
content.appendChild(productNameRemainingPart);
|
||||||
content.appendChild(productVariant);
|
|
||||||
content.appendChild(productColorCharacteristics);
|
productContainer.appendChild(productVariant);
|
||||||
|
productContainer.appendChild(productCharacteristicLine1);
|
||||||
|
productContainer.appendChild(productCharacteristicLine2);
|
||||||
|
|
||||||
|
content.appendChild(productContainer);
|
||||||
content.appendChild(productId);
|
content.appendChild(productId);
|
||||||
|
|
||||||
/* container */
|
/* container */
|
||||||
|
@ -108,20 +119,34 @@ window.onload = () => {
|
||||||
labels.appendChild(label);
|
labels.appendChild(label);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
adjustFontSize();
|
||||||
|
|
||||||
function adjustFontSize() {
|
function adjustFontSize() {
|
||||||
const container = document.getElementsByClassName("product-variant")[0];
|
console.log("Adjusting font size");
|
||||||
|
|
||||||
|
const container = document.getElementsByClassName("product-container")[0];
|
||||||
const text = document.getElementById("text");
|
const text = document.getElementById("text");
|
||||||
const containerWidth = container.offsetWidth;
|
const containerWidth = container.offsetWidth;
|
||||||
let fontSize = 100; // Startgröße in Prozent
|
let fontSize = 100; // Startgröße in Prozent
|
||||||
text.style.fontSize = fontSize + "%";
|
text.style.fontSize = fontSize + "%";
|
||||||
|
|
||||||
|
console.log("Initial sizes", {
|
||||||
|
containerWidth,
|
||||||
|
textWidth: text.offsetWidth,
|
||||||
|
});
|
||||||
|
|
||||||
// Reduziere die Schriftgröße, bis der Text in den Container passt
|
// Reduziere die Schriftgröße, bis der Text in den Container passt
|
||||||
while (text.offsetWidth > containerWidth && fontSize > 1) {
|
while (text.offsetWidth > containerWidth && fontSize > 1) {
|
||||||
fontSize--;
|
fontSize--;
|
||||||
text.style.fontSize = fontSize + "%";
|
text.style.fontSize = fontSize + "%";
|
||||||
}
|
console.log("Resizing", { fontSize, textWidth: text.offsetWidth });
|
||||||
}
|
}
|
||||||
|
|
||||||
window.onload = adjustFontSize;
|
console.log("Final font size:", fontSize + "%");
|
||||||
window.onresize = adjustFontSize;
|
}
|
||||||
|
|
||||||
|
// Verwenden Sie die addEventListener-Methode, um sicherzustellen, dass die Funktionen korrekt zugewiesen werden
|
||||||
|
window.addEventListener("load", adjustFontSize);
|
||||||
|
window.addEventListener("resize", adjustFontSize); */
|
||||||
};
|
};
|
||||||
|
|
|
@ -20,41 +20,41 @@
|
||||||
"type": "select",
|
"type": "select",
|
||||||
"displayName": "Produkttyp auswählen",
|
"displayName": "Produkttyp auswählen",
|
||||||
"options": [
|
"options": [
|
||||||
"#32420 Gizmo die Eidechse, Farbe, Grün/Blau/Orange (Glänzend)",
|
"#32420 Gizmo die Eidechse, Farbe, Grün/Blau/Orange, (Glänzend)",
|
||||||
"#83650 Gizmo die Eidechse, Farbe, Gold (Glänzend)",
|
"#83650 Gizmo die Eidechse, Farbe, Gold, (Glänzend)",
|
||||||
"#92784 Gizmo die Eidechse, Farbe, Glitzer Grün (Seidenmatt)",
|
"#92784 Gizmo die Eidechse, Farbe, Glitzer Grün, (Seidenmatt)",
|
||||||
"#36521 Charlie das Häschen, Farbe, Hellbraun (Matt)",
|
"#36521 Charlie das Häschen, Farbe, Hellbraun, (Matt)",
|
||||||
"#48273 Charlie das Häschen, Farbe, Gold (Glänzend)",
|
"#48273 Charlie das Häschen, Farbe, Gold, (Glänzend)",
|
||||||
"#71936 Ruby die Schlange, Farbe, Feuerrot (Glänzend)",
|
"#71936 Ruby die Schlange, Farbe, Feuerrot, (Glänzend)",
|
||||||
"#58324 Ruby die Schlange, Farbe, Rot/Blau (Glänzend)",
|
"#58324 Ruby die Schlange, Farbe, Rot/Blau, (Glänzend)",
|
||||||
"#78648 Ruby die Schlange, Farbe, Gold (Glänzend)",
|
"#78648 Ruby die Schlange, Farbe, Gold, (Glänzend)",
|
||||||
"#21433 Bruno der Dino, Farbe, Grün/Blau/Orange (Glänzend)",
|
"#21433 Bruno der Dino, Farbe, Grün/Blau/Orange, (Glänzend)",
|
||||||
"#57953 Bruno der Dino, Farbe, Rot/Blau (Glänzend)",
|
"#57953 Bruno der Dino, Farbe, Rot/Blau, (Glänzend)",
|
||||||
"#90578 Bruno der Dino, Farbe, Gold (Glänzend)",
|
"#90578 Bruno der Dino, Farbe, Gold, (Glänzend)",
|
||||||
"#51563 Bruno der Dino, Farbe, Himmelblau (Fluoreszierend)",
|
"#51563 Bruno der Dino, Farbe, Himmelblau, (Fluoreszierend)",
|
||||||
"#23564 Flamara der Drache, Farbe, Feuerrot (Glänzend)",
|
"#23564 Flamara der Drache, Farbe, Feuerrot, (Glänzend)",
|
||||||
"#51139 Flamara der Drache, Farbe, Himmelblau (Fluoreszierend)",
|
"#51139 Flamara der Drache, Farbe, Himmelblau, (Fluoreszierend)",
|
||||||
"#77970 Flamara der Drache, Farbe, Gold (Glänzend)",
|
"#77970 Flamara der Drache, Farbe, Gold, (Glänzend)",
|
||||||
"#43356 Flamara der Drache, Farbe, Schwarz",
|
"#43356 Flamara der Drache, Farbe, Schwarz, ",
|
||||||
"#32974 Finn der Sad Hamster, Stil, Standard / Weiblich",
|
"#32974 Finn der Sad Hamster, Stil, Standard, Weiblich",
|
||||||
"#60798 Finn der Sad Hamster, Stil, Schlüsselanhänger / Weiblich",
|
"#60798 Finn der Sad Hamster, Stil, Schlüsselanhänger, Weiblich",
|
||||||
"#30563 Finn der Sad Hamster, Stil, Groß / Weiblich",
|
"#30563 Finn der Sad Hamster, Stil, Groß, Weiblich",
|
||||||
"#90586 Finn der Sad Hamster, Stil, Standard / Männlich",
|
"#90586 Finn der Sad Hamster, Stil, Standard, Männlich",
|
||||||
"#99560 Finn der Sad Hamster, Stil, Schlüsselanhänger / Männlich",
|
"#99560 Finn der Sad Hamster, Stil, Schlüsselanhänger, Männlich",
|
||||||
"#47364 Finn der Sad Hamster, Stil, Groß / Männlich",
|
"#47364 Finn der Sad Hamster, Stil, Groß, Männlich",
|
||||||
"#93047 Mia das Kätzchen, Farbe, Grau",
|
"#93047 Mia das Kätzchen, Farbe, Grau, ",
|
||||||
"#86423 Mia das Kätzchen, Farbe, Weiß",
|
"#86423 Mia das Kätzchen, Farbe, Weiß, ",
|
||||||
"#X38764 Mia das Kätzchen, Farbe, Weiß (Schlüsselanhänger)",
|
"#X38764 Mia das Kätzchen, Farbe, Weiß, (Schlüsselanhänger)",
|
||||||
"#56083 Hoppel das Häschen, Farbe, Grau",
|
"#56083 Hoppel das Häschen, Farbe, Grau, ",
|
||||||
"#78693 Elias der Corgi, Farbe, Braun/Weiß",
|
"#78693 Elias der Corgi, Farbe, Braun/Weiß, ",
|
||||||
"#37335 Axel der Axolotl, Farbe, Pink",
|
"#37335 Axel der Axolotl, Farbe, Pink, ",
|
||||||
"#26822 Dilo der Delfin, Farbe, Blau ➔ Weiß",
|
"#26822 Dilo der Delfin, Farbe, Blau ➔ Weiß, ",
|
||||||
"#51665 Sunny das Einhorn, Farbe, Weiß",
|
"#51665 Sunny das Einhorn, Farbe, Weiß, ",
|
||||||
"#35717 Stella der Phönix, Farbe, Sonderanfertigung Rosa/Weiß",
|
"#35717 Stella der Phönix, Farbe, Sonderanfertigung, Rosa/Weiß",
|
||||||
"#26843 Stella der Phönix, Farbe, Verlauf Lila/Pink",
|
"#26843 Stella der Phönix, Farbe, Verlauf Lila/Pink, ",
|
||||||
"#74943 Brain der Fuchs, Stil, Standard",
|
"#74943 Brain der Fuchs, Stil, Standard, ",
|
||||||
"#78071 Weißer Hund, Stil, Weiß",
|
"#78071 Weißer Hund, Stil, Weiß, ",
|
||||||
"#92734 Amigo der Capybara, Farbe, Braun"
|
"#92734 Amigo der Capybara, Farbe, Braun, "
|
||||||
],
|
],
|
||||||
"global": false
|
"global": false
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,22 +55,11 @@ if __name__ == "__main__":
|
||||||
with open("index.js", "r") as file:
|
with open("index.js", "r") as file:
|
||||||
indexjs = file.read()
|
indexjs = file.read()
|
||||||
|
|
||||||
product_color_characteristics = ""
|
|
||||||
|
|
||||||
if product["product_variant"] != "Farbe":
|
|
||||||
product_variant = product["product_variant"] + " " + product["product_color"]
|
|
||||||
else:
|
|
||||||
product_color_splitted = product["product_color"].split(" ")
|
|
||||||
|
|
||||||
product_variant = product["product_variant"] + " " + product_color_splitted[0]
|
|
||||||
|
|
||||||
if len(product_color_splitted) > 1:
|
|
||||||
product_color_characteristics = product_color_splitted[1]
|
|
||||||
|
|
||||||
indexjs = indexjs.replace("{{PRODUCT_ID}}", product["id"])
|
indexjs = indexjs.replace("{{PRODUCT_ID}}", product["id"])
|
||||||
indexjs = indexjs.replace("{{PRODUCT_NAME}}", product["name"])
|
indexjs = indexjs.replace("{{PRODUCT_NAME}}", product["name"])
|
||||||
indexjs = indexjs.replace("{{PRODUCT_VARIANT}}", product_variant)
|
indexjs = indexjs.replace("{{PRODUCT_VARIANT}}", product["product_variant"])
|
||||||
indexjs = indexjs.replace("{{PRODUCT_COLOR_CHARACTERISTICS}}", product_color_characteristics)
|
indexjs = indexjs.replace("{{PRODUCT_CHARACTERISTIC_LINE_1}}", product["product_characteristic_line_1"])
|
||||||
|
indexjs = indexjs.replace("{{PRODUCT_CHARACTERISTIC_LINE_2}}", product["product_characteristic_line_2"])
|
||||||
indexjs = indexjs.replace("{{LABEL_PAPER_POSITION}}", label_paper_position)
|
indexjs = indexjs.replace("{{LABEL_PAPER_POSITION}}", label_paper_position)
|
||||||
|
|
||||||
with open("index.js", "w") as file:
|
with open("index.js", "w") as file:
|
||||||
|
|
|
@ -4,211 +4,246 @@
|
||||||
"id": "32420",
|
"id": "32420",
|
||||||
"name": "Gizmo_die Eidechse",
|
"name": "Gizmo_die Eidechse",
|
||||||
"product_variant": "Farbe",
|
"product_variant": "Farbe",
|
||||||
"product_color": "Grün/Blau/Orange (Glänzend)"
|
"product_characteristic_line_1": "Grün/Blau/Orange",
|
||||||
|
"product_characteristic_line_2": "(Glänzend)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "83650",
|
"id": "83650",
|
||||||
"name": "Gizmo_die Eidechse",
|
"name": "Gizmo_die Eidechse",
|
||||||
"product_variant": "Farbe",
|
"product_variant": "Farbe",
|
||||||
"product_color": "Gold (Glänzend)"
|
"product_characteristic_line_1": "Gold",
|
||||||
|
"product_characteristic_line_2": "(Glänzend)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "92784",
|
"id": "92784",
|
||||||
"name": "Gizmo_die Eidechse",
|
"name": "Gizmo_die Eidechse",
|
||||||
"product_variant": "Farbe",
|
"product_variant": "Farbe",
|
||||||
"product_color": "Glitzer Grün (Seidenmatt)"
|
"product_characteristic_line_1": "Glitzer Grün",
|
||||||
|
"product_characteristic_line_2": "(Seidenmatt)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "36521",
|
"id": "36521",
|
||||||
"name": "Charlie_das Häschen",
|
"name": "Charlie_das Häschen",
|
||||||
"product_variant": "Farbe",
|
"product_variant": "Farbe",
|
||||||
"product_color": "Hellbraun (Matt)"
|
"product_characteristic_line_1": "Hellbraun",
|
||||||
|
"product_characteristic_line_2": "(Matt)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "48273",
|
"id": "48273",
|
||||||
"name": "Charlie_das Häschen",
|
"name": "Charlie_das Häschen",
|
||||||
"product_variant": "Farbe",
|
"product_variant": "Farbe",
|
||||||
"product_color": "Gold (Glänzend)"
|
"product_characteristic_line_1": "Gold",
|
||||||
|
"product_characteristic_line_2": "(Glänzend)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "71936",
|
"id": "71936",
|
||||||
"name": "Ruby_die Schlange",
|
"name": "Ruby_die Schlange",
|
||||||
"product_variant": "Farbe",
|
"product_variant": "Farbe",
|
||||||
"product_color": "Feuerrot (Glänzend)"
|
"product_characteristic_line_1": "Feuerrot",
|
||||||
|
"product_characteristic_line_2": "(Glänzend)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "58324",
|
"id": "58324",
|
||||||
"name": "Ruby_die Schlange",
|
"name": "Ruby_die Schlange",
|
||||||
"product_variant": "Farbe",
|
"product_variant": "Farbe",
|
||||||
"product_color": "Rot/Blau (Glänzend)"
|
"product_characteristic_line_1": "Rot/Blau",
|
||||||
|
"product_characteristic_line_2": "(Glänzend)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "78648",
|
"id": "78648",
|
||||||
"name": "Ruby_die Schlange",
|
"name": "Ruby_die Schlange",
|
||||||
"product_variant": "Farbe",
|
"product_variant": "Farbe",
|
||||||
"product_color": "Gold (Glänzend)"
|
"product_characteristic_line_1": "Gold",
|
||||||
|
"product_characteristic_line_2": "(Glänzend)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "21433",
|
"id": "21433",
|
||||||
"name": "Bruno_der Dino",
|
"name": "Bruno_der Dino",
|
||||||
"product_variant": "Farbe",
|
"product_variant": "Farbe",
|
||||||
"product_color": "Grün/Blau/Orange (Glänzend)"
|
"product_characteristic_line_1": "Grün/Blau/Orange",
|
||||||
|
"product_characteristic_line_2": "(Glänzend)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "57953",
|
"id": "57953",
|
||||||
"name": "Bruno_der Dino",
|
"name": "Bruno_der Dino",
|
||||||
"product_variant": "Farbe",
|
"product_variant": "Farbe",
|
||||||
"product_color": "Rot/Blau (Glänzend)"
|
"product_characteristic_line_1": "Rot/Blau",
|
||||||
|
"product_characteristic_line_2": "(Glänzend)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "90578",
|
"id": "90578",
|
||||||
"name": "Bruno_der Dino",
|
"name": "Bruno_der Dino",
|
||||||
"product_variant": "Farbe",
|
"product_variant": "Farbe",
|
||||||
"product_color": "Gold (Glänzend)"
|
"product_characteristic_line_1": "Gold",
|
||||||
|
"product_characteristic_line_2": "(Glänzend)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "51563",
|
"id": "51563",
|
||||||
"name": "Bruno_der Dino",
|
"name": "Bruno_der Dino",
|
||||||
"product_variant": "Farbe",
|
"product_variant": "Farbe",
|
||||||
"product_color": "Himmelblau (Fluoreszierend)"
|
"product_characteristic_line_1": "Himmelblau",
|
||||||
|
"product_characteristic_line_2": "(Fluoreszierend)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "23564",
|
"id": "23564",
|
||||||
"name": "Flamara_der Drache",
|
"name": "Flamara_der Drache",
|
||||||
"product_variant": "Farbe",
|
"product_variant": "Farbe",
|
||||||
"product_color": "Feuerrot (Glänzend)"
|
"product_characteristic_line_1": "Feuerrot",
|
||||||
|
"product_characteristic_line_2": "(Glänzend)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "51139",
|
"id": "51139",
|
||||||
"name": "Flamara_der Drache",
|
"name": "Flamara_der Drache",
|
||||||
"product_variant": "Farbe",
|
"product_variant": "Farbe",
|
||||||
"product_color": "Himmelblau (Fluoreszierend)"
|
"product_characteristic_line_1": "Himmelblau",
|
||||||
|
"product_characteristic_line_2": "(Fluoreszierend)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "77970",
|
"id": "77970",
|
||||||
"name": "Flamara_der Drache",
|
"name": "Flamara_der Drache",
|
||||||
"product_variant": "Farbe",
|
"product_variant": "Farbe",
|
||||||
"product_color": "Gold (Glänzend)"
|
"product_characteristic_line_1": "Gold",
|
||||||
|
"product_characteristic_line_2": "(Glänzend)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "43356",
|
"id": "43356",
|
||||||
"name": "Flamara_der Drache",
|
"name": "Flamara_der Drache",
|
||||||
"product_variant": "Farbe",
|
"product_variant": "Farbe",
|
||||||
"product_color": "Schwarz"
|
"product_characteristic_line_1": "Schwarz",
|
||||||
|
"product_characteristic_line_2": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "32974",
|
"id": "32974",
|
||||||
"name": "Finn der_Sad Hamster",
|
"name": "Finn der_Sad Hamster",
|
||||||
"product_variant": "Stil",
|
"product_variant": "Stil",
|
||||||
"product_color": "Standard / Weiblich"
|
"product_characteristic_line_1": "Standard",
|
||||||
|
"product_characteristic_line_2": "Weiblich"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "60798",
|
"id": "60798",
|
||||||
"name": "Finn der_Sad Hamster",
|
"name": "Finn der_Sad Hamster",
|
||||||
"product_variant": "Stil",
|
"product_variant": "Stil",
|
||||||
"product_color": "Schlüsselanhänger / Weiblich"
|
"product_characteristic_line_1": "Schlüsselanhänger",
|
||||||
|
"product_characteristic_line_2": "Weiblich"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "30563",
|
"id": "30563",
|
||||||
"name": "Finn der_Sad Hamster",
|
"name": "Finn der_Sad Hamster",
|
||||||
"product_variant": "Stil",
|
"product_variant": "Stil",
|
||||||
"product_color": "Groß / Weiblich"
|
"product_characteristic_line_1": "Groß",
|
||||||
|
"product_characteristic_line_2": "Weiblich"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "90586",
|
"id": "90586",
|
||||||
"name": "Finn der_Sad Hamster",
|
"name": "Finn der_Sad Hamster",
|
||||||
"product_variant": "Stil",
|
"product_variant": "Stil",
|
||||||
"product_color": "Standard / Männlich"
|
"product_characteristic_line_1": "Standard",
|
||||||
|
"product_characteristic_line_2": "Männlich"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "99560",
|
"id": "99560",
|
||||||
"name": "Finn der_Sad Hamster",
|
"name": "Finn der_Sad Hamster",
|
||||||
"product_variant": "Stil",
|
"product_variant": "Stil",
|
||||||
"product_color": "Schlüsselanhänger / Männlich"
|
"product_characteristic_line_1": "Schlüsselanhänger",
|
||||||
|
"product_characteristic_line_2": "Männlich"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "47364",
|
"id": "47364",
|
||||||
"name": "Finn der_Sad Hamster",
|
"name": "Finn der_Sad Hamster",
|
||||||
"product_variant": "Stil",
|
"product_variant": "Stil",
|
||||||
"product_color": "Groß / Männlich"
|
"product_characteristic_line_1": "Groß",
|
||||||
|
"product_characteristic_line_2": "Männlich"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "93047",
|
"id": "93047",
|
||||||
"name": "Mia_das Kätzchen",
|
"name": "Mia_das Kätzchen",
|
||||||
"product_variant": "Farbe",
|
"product_variant": "Farbe",
|
||||||
"product_color": "Grau"
|
"product_characteristic_line_1": "Grau",
|
||||||
|
"product_characteristic_line_2": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "86423",
|
"id": "86423",
|
||||||
"name": "Mia_das Kätzchen",
|
"name": "Mia_das Kätzchen",
|
||||||
"product_variant": "Farbe",
|
"product_variant": "Farbe",
|
||||||
"product_color": "Weiß"
|
"product_characteristic_line_1": "Weiß",
|
||||||
|
"product_characteristic_line_2": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "X38764",
|
"id": "X38764",
|
||||||
"name": "Mia_das Kätzchen",
|
"name": "Mia_das Kätzchen",
|
||||||
"product_variant": "Farbe",
|
"product_variant": "Farbe",
|
||||||
"product_color": "Weiß (Schlüsselanhänger)"
|
"product_characteristic_line_1": "Weiß",
|
||||||
|
"product_characteristic_line_2": "(Schlüsselanhänger)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "56083",
|
"id": "56083",
|
||||||
"name": "Hoppel_das Häschen",
|
"name": "Hoppel_das Häschen",
|
||||||
"product_variant": "Farbe",
|
"product_variant": "Farbe",
|
||||||
"product_color": "Grau"
|
"product_characteristic_line_1": "Grau",
|
||||||
|
"product_characteristic_line_2": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "78693",
|
"id": "78693",
|
||||||
"name": "Elias_der Corgi",
|
"name": "Elias_der Corgi",
|
||||||
"product_variant": "Farbe",
|
"product_variant": "Farbe",
|
||||||
"product_color": "Braun/Weiß"
|
"product_characteristic_line_1": "Braun/Weiß",
|
||||||
|
"product_characteristic_line_2": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "37335",
|
"id": "37335",
|
||||||
"name": "Axel_der Axolotl",
|
"name": "Axel_der Axolotl",
|
||||||
"product_variant": "Farbe",
|
"product_variant": "Farbe",
|
||||||
"product_color": "Pink"
|
"product_characteristic_line_1": "Pink",
|
||||||
|
"product_characteristic_line_2": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "26822",
|
"id": "26822",
|
||||||
"name": "Dilo_der Delfin",
|
"name": "Dilo_der Delfin",
|
||||||
"product_variant": "Farbe",
|
"product_variant": "Farbe",
|
||||||
"product_color": "Blau ➔ Weiß"
|
"product_characteristic_line_1": "Blau ➔ Weiß",
|
||||||
|
"product_characteristic_line_2": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "51665",
|
"id": "51665",
|
||||||
"name": "Sunny_das Einhorn",
|
"name": "Sunny_das Einhorn",
|
||||||
"product_variant": "Farbe",
|
"product_variant": "Farbe",
|
||||||
"product_color": "Weiß"
|
"product_characteristic_line_1": "Weiß",
|
||||||
|
"product_characteristic_line_2": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "35717",
|
"id": "35717",
|
||||||
"name": "Stella_der Phönix",
|
"name": "Stella_der Phönix",
|
||||||
"product_variant": "Farbe",
|
"product_variant": "Farbe",
|
||||||
"product_color": "Sonderanfertigung Rosa/Weiß"
|
"product_characteristic_line_1": "Sonderanfertigung",
|
||||||
|
"product_characteristic_line_2": "Rosa/Weiß"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "26843",
|
"id": "26843",
|
||||||
"name": "Stella_der Phönix",
|
"name": "Stella_der Phönix",
|
||||||
"product_variant": "Farbe",
|
"product_variant": "Farbe",
|
||||||
"product_color": "Verlauf Lila/Pink"
|
"product_characteristic_line_1": "Verlauf Lila/Pink",
|
||||||
|
"product_characteristic_line_2": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "74943",
|
"id": "74943",
|
||||||
"name": "Brain_der Fuchs",
|
"name": "Brain_der Fuchs",
|
||||||
"product_variant": "Stil",
|
"product_variant": "Stil",
|
||||||
"product_color": "Standard"
|
"product_characteristic_line_1": "Standard",
|
||||||
|
"product_characteristic_line_2": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "78071",
|
"id": "78071",
|
||||||
"name": "Weißer_Hund",
|
"name": "Weißer_Hund",
|
||||||
"product_variant": "Stil",
|
"product_variant": "Stil",
|
||||||
"product_color": "Weiß"
|
"product_characteristic_line_1": "Weiß",
|
||||||
|
"product_characteristic_line_2": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "92734",
|
"id": "92734",
|
||||||
"name": "Amigo_der Capybara",
|
"name": "Amigo_der Capybara",
|
||||||
"product_variant": "Farbe",
|
"product_variant": "Farbe",
|
||||||
"product_color": "Braun"
|
"product_characteristic_line_1": "Braun",
|
||||||
|
"product_characteristic_line_2": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
Reference in New Issue