bash-script-maker 1.9.0__py3-none-any.whl → 1.11.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: bash-script-maker
3
- Version: 1.9.0
3
+ Version: 1.11.0
4
4
  Summary: Ein GUI-Programm zur Erstellung von Bash-Scripts mit visueller Unterstützung
5
5
  Home-page: https://github.com/securebitsorg/bash-script-maker
6
6
  Author: Marcel Dellmann
@@ -0,0 +1,11 @@
1
+ assets.py,sha256=QMUllYA8CPAdu5ulDGRZm3opmimFSSAllUCol_RylmA,1012
2
+ bash_script_maker.py,sha256=7GRHF5wngqVHnotO7KOFOLb9nrVkfoprdAqgHv8A2TA,45590
3
+ custom_dialogs.py,sha256=Rr3jXuuZFRDNSBiM2sHcKhix3yiacvQkp6eluozwzmk,9243
4
+ localization.py,sha256=6Dbyf8qG-p6_vUDPoBTtVBnSixO7_gLVtPnuIC4Fchs,1344
5
+ syntax_highlighter.py,sha256=1umHO8lhhb_FxomXS3Yiub-KTWtBymt60ct5Www3boU,34954
6
+ bash_script_maker-1.11.0.dist-info/LICENSE,sha256=G-uFRliqQDtsMvClHiUhNBw84dKRzqodui4tIRPJta8,2334
7
+ bash_script_maker-1.11.0.dist-info/METADATA,sha256=qTEiU3atsf10hNm4WIqVdaggWKfzUuIJOtvp97g6LRw,14848
8
+ bash_script_maker-1.11.0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
9
+ bash_script_maker-1.11.0.dist-info/entry_points.txt,sha256=jof_Nbub3hvayvOeVKrYpFDadAkCSUA3rqT7n61WED8,119
10
+ bash_script_maker-1.11.0.dist-info/top_level.txt,sha256=aQp35H7s1JAeQ5IhRLDUS7D-u5ob4IEsGv4ItOv5Afo,72
11
+ bash_script_maker-1.11.0.dist-info/RECORD,,
bash_script_maker.py CHANGED
@@ -4,10 +4,66 @@
4
4
  Bash-Script-Maker - Ein GUI-Programm zur Erstellung von Bash-Scripts
5
5
  """
6
6
 
7
- try:
8
- from __version__ import __version__
9
- except ImportError:
10
- __version__ = "1.2.1"
7
+
8
+ def get_version():
9
+ """Ermittelt die aktuelle Version dynamisch"""
10
+ import os
11
+
12
+ # 1. Versuche __version__.py zu importieren
13
+ try:
14
+ from __version__ import __version__
15
+
16
+ return __version__
17
+ except ImportError:
18
+ pass
19
+
20
+ # 2. Versuche VERSION Datei zu lesen
21
+ try:
22
+ script_dir = os.path.dirname(os.path.abspath(__file__))
23
+ version_file = os.path.join(script_dir, "VERSION")
24
+ if os.path.exists(version_file):
25
+ with open(version_file, "r", encoding="utf-8") as f:
26
+ return f.read().strip()
27
+ except Exception:
28
+ pass
29
+
30
+ # 3. Versuche pyproject.toml zu parsen
31
+ try:
32
+ script_dir = os.path.dirname(os.path.abspath(__file__))
33
+ pyproject_file = os.path.join(script_dir, "pyproject.toml")
34
+ if os.path.exists(pyproject_file):
35
+ with open(pyproject_file, "r", encoding="utf-8") as f:
36
+ content = f.read()
37
+ import re
38
+
39
+ match = re.search(r'version\s*=\s*"([^"]+)"', content)
40
+ if match:
41
+ return match.group(1)
42
+ except Exception:
43
+ pass
44
+
45
+ # 4. Versuche Git-Tag zu ermitteln (falls in Git-Repository)
46
+ try:
47
+ import subprocess
48
+
49
+ result = subprocess.run(
50
+ ["git", "describe", "--tags", "--abbrev=0"],
51
+ capture_output=True,
52
+ text=True,
53
+ cwd=os.path.dirname(os.path.abspath(__file__)),
54
+ )
55
+ if result.returncode == 0:
56
+ tag = result.stdout.strip()
57
+ # Entferne 'v' Präfix falls vorhanden
58
+ return tag.lstrip("v")
59
+ except Exception:
60
+ pass
61
+
62
+ # 5. Fallback
63
+ return "1.9.0"
64
+
65
+
66
+ __version__ = get_version()
11
67
 
12
68
  import tkinter as tk
13
69
  from tkinter import scrolledtext, messagebox
@@ -485,31 +541,31 @@ class BashScriptMaker:
485
541
  """Erstellt den Header-Bereich mit Logo, App-Titel und Version"""
486
542
  header_frame = ttk.Frame(self.root, bootstyle="primary")
487
543
  header_frame.pack(side=tk.TOP, fill=tk.X, padx=5, pady=(5, 10))
488
-
544
+
489
545
  # Header-Container für bessere Kontrolle
490
546
  header_container = ttk.Frame(header_frame)
491
547
  header_container.pack(fill=tk.X, padx=15, pady=10)
492
-
548
+
493
549
  # Logo (links)
494
550
  logo_frame = ttk.Frame(header_container)
495
551
  logo_frame.pack(side=tk.LEFT)
496
-
552
+
497
553
  try:
498
554
  script_dir = os.path.dirname(os.path.abspath(__file__))
499
555
  logo_path = os.path.join(script_dir, "assets", "bash-script-maker-48.png")
500
-
556
+
501
557
  if os.path.exists(logo_path):
502
558
  try:
503
559
  from PIL import Image, ImageTk
504
-
560
+
505
561
  # Logo für Header (48x48)
506
562
  img = Image.open(logo_path)
507
563
  logo_photo = ImageTk.PhotoImage(img)
508
-
564
+
509
565
  logo_label = ttk.Label(logo_frame, image=logo_photo)
510
566
  logo_label.image = logo_photo # Referenz behalten
511
567
  logo_label.pack(side=tk.LEFT, padx=(0, 15))
512
-
568
+
513
569
  except ImportError:
514
570
  # Fallback: Großes Emoji
515
571
  logo_label = ttk.Label(logo_frame, text="🖥️", font=("Arial", 36))
@@ -518,51 +574,52 @@ class BashScriptMaker:
518
574
  # Fallback: Emoji
519
575
  logo_label = ttk.Label(logo_frame, text="🖥️", font=("Arial", 36))
520
576
  logo_label.pack(side=tk.LEFT, padx=(0, 15))
521
-
577
+
522
578
  except Exception as e:
523
579
  print(f"Fehler beim Laden des Header-Logos: {e}")
524
580
  # Minimaler Fallback
525
581
  logo_label = ttk.Label(logo_frame, text="🖥️", font=("Arial", 24))
526
582
  logo_label.pack(side=tk.LEFT, padx=(0, 15))
527
-
583
+
528
584
  # Titel und Version (mittig-links)
529
585
  title_frame = ttk.Frame(header_container)
530
586
  title_frame.pack(side=tk.LEFT, fill=tk.X, expand=True)
531
-
587
+
532
588
  # Haupttitel
533
589
  title_label = ttk.Label(
534
590
  title_frame,
535
591
  text="Bash-Script-Maker",
536
592
  font=("Arial", 24, "bold"),
537
- bootstyle="inverse-primary"
593
+ bootstyle="inverse-primary",
538
594
  )
539
595
  title_label.pack(anchor=tk.W)
540
-
596
+
541
597
  # Untertitel mit Version
542
598
  subtitle_label = ttk.Label(
543
599
  title_frame,
544
600
  text=f"Version {__version__} - Professioneller Bash-Script-Generator",
545
601
  font=("Arial", 11),
546
- bootstyle="inverse-secondary"
602
+ bootstyle="inverse-secondary",
547
603
  )
548
604
  subtitle_label.pack(anchor=tk.W, pady=(2, 0))
549
-
605
+
550
606
  # Status-Info (rechts)
551
607
  status_frame = ttk.Frame(header_container)
552
608
  status_frame.pack(side=tk.RIGHT)
553
-
609
+
554
610
  # Aktuelle Zeit/Datum als zusätzliche Info
555
611
  import datetime
612
+
556
613
  current_time = datetime.datetime.now().strftime("%d.%m.%Y")
557
-
614
+
558
615
  info_label = ttk.Label(
559
616
  status_frame,
560
617
  text=f"Gestartet: {current_time}",
561
618
  font=("Arial", 9),
562
- bootstyle="inverse-secondary"
619
+ bootstyle="inverse-secondary",
563
620
  )
564
621
  info_label.pack(anchor=tk.E)
565
-
622
+
566
623
  # Separator-Linie unter dem Header
567
624
  separator = ttk.Separator(self.root, orient=tk.HORIZONTAL)
568
625
  separator.pack(side=tk.TOP, fill=tk.X, padx=5)
@@ -1,11 +0,0 @@
1
- assets.py,sha256=QMUllYA8CPAdu5ulDGRZm3opmimFSSAllUCol_RylmA,1012
2
- bash_script_maker.py,sha256=2z0Lb1r7jxG5WimYWdBAeHhkEnDFGfB8nll8TJxfrXk,44125
3
- custom_dialogs.py,sha256=Rr3jXuuZFRDNSBiM2sHcKhix3yiacvQkp6eluozwzmk,9243
4
- localization.py,sha256=6Dbyf8qG-p6_vUDPoBTtVBnSixO7_gLVtPnuIC4Fchs,1344
5
- syntax_highlighter.py,sha256=1umHO8lhhb_FxomXS3Yiub-KTWtBymt60ct5Www3boU,34954
6
- bash_script_maker-1.9.0.dist-info/LICENSE,sha256=G-uFRliqQDtsMvClHiUhNBw84dKRzqodui4tIRPJta8,2334
7
- bash_script_maker-1.9.0.dist-info/METADATA,sha256=g6cjz9Ib8WjrsCtGVRh_2pZ2GNsuBZ79O9jSvft6euA,14847
8
- bash_script_maker-1.9.0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
9
- bash_script_maker-1.9.0.dist-info/entry_points.txt,sha256=jof_Nbub3hvayvOeVKrYpFDadAkCSUA3rqT7n61WED8,119
10
- bash_script_maker-1.9.0.dist-info/top_level.txt,sha256=aQp35H7s1JAeQ5IhRLDUS7D-u5ob4IEsGv4ItOv5Afo,72
11
- bash_script_maker-1.9.0.dist-info/RECORD,,