-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvdxconvert.py
More file actions
49 lines (40 loc) · 1.3 KB
/
vdxconvert.py
File metadata and controls
49 lines (40 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
VDXConvert - Batch converter for Visio files to VDX format
BACKWARD COMPATIBILITY WRAPPER
==============================
This file provides backward compatibility for the legacy vdxconvert.py script.
The actual implementation has been refactored into a modular package structure
located in src/vdxconvert/.
For new code, please use:
from vdxconvert.cli import main
# or
python -m vdxconvert [options]
This wrapper will be maintained for backward compatibility but may be deprecated
in future versions.
Author: Sam Lyndon
Version: 1.0.0
License: MIT
"""
import sys
from pathlib import Path
# Add src directory to path to import the new package
src_path = Path(__file__).parent / "src"
if src_path.exists():
sys.path.insert(0, str(src_path))
try:
# Import the new modular implementation
from vdxconvert.cli import main
# Run the CLI
if __name__ == "__main__":
sys.exit(main())
except ImportError as e:
# Fallback message if new package is not available
print("Error: Unable to import vdxconvert package.")
print(f"Details: {e}")
print("\nPlease ensure the package is properly installed:")
print(" pip install -e .")
print("\nOr run directly from the package:")
print(" python -m vdxconvert")
sys.exit(1)