39 lines
1.2 KiB
Python
39 lines
1.2 KiB
Python
# Test script per verificare l'integrazione del batch converter
|
|
|
|
import sys
|
|
import os
|
|
|
|
# Aggiungi il percorso del modulo al path
|
|
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
try:
|
|
# Test import dei moduli principali
|
|
print("Testing imports...")
|
|
from markdownconverter.gui.gui import MarkdownConverterApp
|
|
from markdownconverter.gui.batch_converter import BatchConverterTab
|
|
from markdownconverter.core.core import (
|
|
combine_markdown_files,
|
|
convert_markdown_to_docx_with_pandoc,
|
|
convert_markdown,
|
|
convert_docx_to_pdf
|
|
)
|
|
print("✅ All imports successful!")
|
|
|
|
# Test avvio GUI (opzionale - commentato per non bloccare)
|
|
print("\nTo test the GUI, uncomment the following lines:")
|
|
print("# import ttkbootstrap as tb")
|
|
print("# root = tb.Window(themename='sandstone')")
|
|
print("# app = MarkdownConverterApp(root)")
|
|
print("# root.mainloop()")
|
|
|
|
print("\n✅ Integration test passed!")
|
|
print("\nYou can now run the application with:")
|
|
print(" python -m markdownconverter")
|
|
|
|
except ImportError as e:
|
|
print(f"❌ Import error: {e}")
|
|
sys.exit(1)
|
|
except Exception as e:
|
|
print(f"❌ Error: {e}")
|
|
sys.exit(1)
|