@ -4,7 +4,7 @@ from tkinter import filedialog, messagebox, ttk
import os
import platform
import subprocess
import urllib . request
from src . uml_generator import UMLGenerator
from src . code_analyzer import JavaAnalyzer , CSharpAnalyzer
from src . project_analyzer import ProjectAnalyzer
@ -12,16 +12,16 @@ from src.readme_generator import ReadmeGenerator
from src . preview_window import PreviewWindow
class UMLGeneratorApp ( ctk . CTk ) :
def __init__ ( self ):
def __init__ ( self , local_version ):
super ( ) . __init__ ( )
self . title ( " Générateur UML et Documentation" )
self . title ( f " CodeMap[{ local_version } ] - Générateur UML et Documentation" )
self . geometry ( " 800x600 " )
ctk . set_appearance_mode ( " dark " )
ctk . set_default_color_theme ( " blue " )
ctk . set_default_color_theme ( " green " )
self . grid_columnconfigure ( 0 , weight = 1 )
@ -35,7 +35,7 @@ class UMLGeneratorApp(ctk.CTk):
self . title_label = ctk . CTkLabel (
self . main_frame ,
text = " Générateur UML et Documentation" ,
text = " CodeMap - Générateur UML et Documentation" ,
font = ( " Helvetica " , 24 , " bold " )
)
self . title_label . grid ( row = 0 , column = 0 , pady = 20 )
@ -325,8 +325,7 @@ class UMLGeneratorApp(ctk.CTk):
from src . uml_generator import UMLGenerator
import tempfile
temp_dir = tempfile . mkdtemp ( )
temp_dir = tempfile . gettempdir ( )
generator = UMLGenerator ( )
temp_diagram = generator . generate_class_diagram ( classes , temp_dir )
@ -540,5 +539,19 @@ class UMLGeneratorApp(ctk.CTk):
print ( f ' Generating README for: { project_title } - { project_description } ' )
if __name__ == " __main__ " :
app = UMLGeneratorApp ( )
url = ' https://codefirst.iut.uca.fr/git/zayd.nahli/CodeMap/raw/branch/master/version/version.txt '
with urllib . request . urlopen ( url ) as response :
remote_version = response . read ( ) . decode ( ) . strip ( )
local_version = " 1.1.1-beta1 "
if local_version != remote_version :
root = tk . Tk ( )
root . withdraw ( )
messagebox . showinfo ( " Mise à jour disponible " ,
f " Votre version de CodeMap ( { local_version } ) n ' est pas à jour. La version la plus récente est { remote_version } . Veuillez mettre à jour votre application pour profiter de toutes les fonctionnalités. " )
app = UMLGeneratorApp ( local_version )
app . mainloop ( )