♻ | New project structure
This commit is contained in:
31
transmutate.py
Normal file
31
transmutate.py
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Transmutate — Media Conversion GUI.
|
||||
|
||||
Usage:
|
||||
python transmutate.py <path/to/image|video|audio>
|
||||
|
||||
Opens a CustomTkinter GUI for converting the specified file.
|
||||
"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
from transmutate_app.gui import open_file
|
||||
|
||||
|
||||
def main():
|
||||
"""CLI entry point: validate arguments and open the GUI."""
|
||||
if len(sys.argv) < 2:
|
||||
print("Usage: python transmutate.py <path/to/image|video|audio>")
|
||||
sys.exit(1)
|
||||
|
||||
filepath = os.path.abspath(sys.argv[1])
|
||||
|
||||
if not os.path.isfile(filepath):
|
||||
print(f"Error: File does not exist: {filepath}", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
open_file(filepath)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user