91 lines
3.8 KiB
Python
91 lines
3.8 KiB
Python
#!/usr/bin/env python3
|
||
"""Folie 10 – Was bringt der Integrationsserver? Wichtige Funktionen (adesso-Stil, deutsch)."""
|
||
|
||
import os
|
||
from pptx import Presentation
|
||
from pptx.util import Inches, Pt
|
||
from pptx.dml.color import RGBColor
|
||
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
|
||
from pptx.enum.shapes import MSO_SHAPE
|
||
from adesso_style import (WHITE, INK, BLUE, TEAL, GREEN, CORAL, LIGHT, MUTE, RECF,
|
||
F, FC, chrome)
|
||
|
||
BG = RGBColor(0x0A, 0x3D, 0x6B)
|
||
SUBC = RGBColor(0x3C, 0x4A, 0x5A)
|
||
|
||
prs = Presentation(); prs.slide_width = Inches(13.333); prs.slide_height = Inches(7.5)
|
||
SW, SH = prs.slide_width, prs.slide_height
|
||
s = prs.slides.add_slide(prs.slide_layouts[6])
|
||
|
||
|
||
def shp(kind, x, y, w, h, fill=None, line=None, lw=Pt(1), adj=None):
|
||
sh = s.shapes.add_shape(kind, Inches(x), Inches(y), Inches(w), Inches(h))
|
||
if fill is None: sh.fill.background()
|
||
else: sh.fill.solid(); sh.fill.fore_color.rgb = fill
|
||
if line is None: sh.line.fill.background()
|
||
else: sh.line.color.rgb = line; sh.line.width = lw
|
||
if adj is not None:
|
||
try: sh.adjustments[0] = adj
|
||
except Exception: pass
|
||
sh.shadow.inherit = False
|
||
return sh
|
||
|
||
|
||
def txt(x, y, w, h, t, size=12, color=WHITE, bold=False, italic=False,
|
||
align=PP_ALIGN.LEFT, font=F, anchor=MSO_ANCHOR.MIDDLE):
|
||
tb = s.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h)); tf = tb.text_frame
|
||
tf.word_wrap = True; tf.vertical_anchor = anchor
|
||
tf.margin_left = tf.margin_right = tf.margin_top = tf.margin_bottom = Pt(0)
|
||
p = tf.paragraphs[0]; p.alignment = align
|
||
r = p.add_run(); r.text = t
|
||
r.font.size = Pt(size); r.font.bold = bold; r.font.italic = italic
|
||
r.font.name = font; r.font.color.rgb = color
|
||
return tb
|
||
|
||
|
||
def card(x, y, w, h, title, body):
|
||
shp(MSO_SHAPE.ROUNDED_RECTANGLE, x, y, w, h, fill=WHITE, adj=0.06)
|
||
shp(MSO_SHAPE.RECTANGLE, x, y + 0.16, 0.12, h - 0.32, fill=CORAL)
|
||
txt(x + 0.32, y + 0.18, w - 0.48, 0.78, title, size=13.5, color=INK, bold=True,
|
||
anchor=MSO_ANCHOR.TOP)
|
||
txt(x + 0.32, y + 0.92, w - 0.52, h - 1.06, body, size=11, color=SUBC,
|
||
anchor=MSO_ANCHOR.TOP)
|
||
|
||
|
||
# ---- Hintergrund + Header --------------------------------------------------
|
||
shp(MSO_SHAPE.RECTANGLE, 0, 0, SW.inches, SH.inches, fill=BG)
|
||
chrome(s, "Was bringt der Integrationsserver?", 11)
|
||
|
||
shp(MSO_SHAPE.RECTANGLE, 0.45, 1.12, 0.16, 0.22, fill=CORAL)
|
||
txt(0.71, 1.05, 9.0, 0.34, "Wichtige Funktionen", size=15, color=WHITE, bold=True,
|
||
anchor=MSO_ANCHOR.MIDDLE)
|
||
|
||
cards = [
|
||
("Zentrale Anbindung (Adapter)",
|
||
"Jedes System über einen Adapter — neues System = neuer Adapter, ohne Eingriff in den Bestand."),
|
||
("Routing der Aufträge",
|
||
"Integriert mehrere LIS- und Abrechnungs-Instanzen — Aufträge werden gezielt an das passende LIS bzw. die richtige Abrechnung verteilt."),
|
||
("Routing Engine",
|
||
"Verteilt Events regelbasiert an die richtigen Ziele — z. B. Proben-Routing."),
|
||
("Event Store (append-only)",
|
||
"Kanonische Wahrheit, vollständige Historie, jederzeit Replay-fähig."),
|
||
("Projektionen / Read-Models",
|
||
"Bedarfsgerechte Sichten: Auftragsstatus, Reporting, Leistungsverzeichnis …"),
|
||
("Stammdaten / MDM",
|
||
"Single Point of Truth — Daten einmal pflegen, doppelte Stammdatenpflege entfällt."),
|
||
("Monitoring & Überwachung",
|
||
"Status, Fehler-Queues und Alerting für alle Schnittstellen an einer Stelle."),
|
||
("Audit-Trail, Replay & Archiv",
|
||
"Revisionssicher & manipulationssicher; Wiederaufsetzen per Replay; Langzeit-Archiv."),
|
||
]
|
||
|
||
cw, ch = 2.92, 2.45
|
||
cols = [0.45, 3.62, 6.79, 9.96]
|
||
rows = [1.58, 4.22]
|
||
for i, (title, body) in enumerate(cards):
|
||
card(cols[i % 4], rows[i // 4], cw, ch, title, body)
|
||
|
||
out = os.path.join(os.path.dirname(os.path.abspath(__file__)), "Folie10.pptx")
|
||
prs.save(out)
|
||
print("saved", out)
|