22 lines
646 B
Python
22 lines
646 B
Python
import sys
|
|
import os
|
|
from pathlib import Path
|
|
sys.path.append(os.path.dirname(__file__))
|
|
from scripts.mermaid import NetworkAnalyzer
|
|
from scripts.parse_uplinks import UplinkReportGenerator
|
|
|
|
def main():
|
|
"""Fonction principale du programme d'analyse."""
|
|
if len(sys.argv) != 2:
|
|
print("Usage: python main.py <fichier_log_coeur>")
|
|
sys.exit(1)
|
|
|
|
coeur_log_filename = sys.argv[1]
|
|
coeur_log_filename = os.path.basename(coeur_log_filename)
|
|
|
|
UplinkReportGenerator().generate_report(coeur_log_filename)
|
|
NetworkAnalyzer(base_dir=Path(__file__).parent).analyze(coeur_log_filename)
|
|
|
|
if __name__ == "__main__":
|
|
main()
|