diff --git a/article_server.py b/article_server.py index cef1bc4..101d4bc 100644 --- a/article_server.py +++ b/article_server.py @@ -1112,6 +1112,12 @@ h1{color:#c0392b;}p{color:#888;} body_match = re.search(r'(?:|)(.*?)(?:]*>.*?\s*', '', article_body, flags=re.DOTALL) + article_body = re.sub(r']*>.*?

\s*', '', article_body, flags=re.DOTALL) + # Extract Joomla ID if present (for updates) jid_match = re.search(r' with open(filepath, "w", encoding="utf-8") as f: f.write(html_content) - # ── Auto-delete associated images ─────────────────────── + # ── Image mapping cleanup: remove association but keep files ── + # Daniel 19.06.: Bilder NICHT löschen — sie werden für + # spätere Live-Schaltungen und Referenz benötigt. if fname in img_map: - for img_path in img_map[fname]: - if os.path.exists(img_path): - try: - os.remove(img_path) - images_deleted_total += 1 - except OSError as e: - errors.append(f"{fname}: Bild {img_path} konnte nicht gelöscht werden: {e}") del img_map[fname] save_image_map(img_map)