auto-editor 29.0.1__py3-none-any.whl → 29.0.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
auto_editor/__init__.py CHANGED
@@ -1,3 +1 @@
1
- """Auto-Editor: Effort free video editing!"""
2
-
3
- __version__ = "29.0.1"
1
+ __version__ = "29.0.3"
auto_editor/__main__.py CHANGED
@@ -1,28 +1,81 @@
1
1
  """Main entry point for auto-editor when run as a module."""
2
2
 
3
- import os
4
- import sys
3
+ import platform
5
4
  import subprocess
5
+ import sys
6
+ import urllib.request
6
7
  from pathlib import Path
7
8
 
9
+ from . import __version__
10
+
11
+ if __version__.startswith("29.0."):
12
+ version = "29.0.0"
13
+ else:
14
+ version = __version__
15
+
16
+
17
+ def get_binary_info():
18
+ """Get the appropriate binary name and download URL for this platform."""
19
+ system = platform.system().lower()
20
+ machine = platform.machine().lower()
21
+
22
+ if system == "windows":
23
+ binary_name = "auto-editor-windows-amd64.exe"
24
+ local_name = "auto-editor.exe"
25
+ elif system == "darwin":
26
+ if machine == "arm64":
27
+ binary_name = "auto-editor-macos-arm64"
28
+ else:
29
+ binary_name = "auto-editor-macos-x86_64"
30
+ local_name = "auto-editor"
31
+ elif system == "linux":
32
+ binary_name = "auto-editor-linux-x86_64"
33
+ local_name = "auto-editor"
34
+ else:
35
+ raise RuntimeError(f"Unsupported platform: {system} {machine}")
36
+
37
+ # Use the package version to construct the download URL
38
+ url = f"https://github.com/WyattBlue/auto-editor/releases/download/{version}/{binary_name}"
39
+ return binary_name, local_name, url
40
+
41
+
42
+ def download_binary():
43
+ """Download the appropriate binary from GitHub releases."""
44
+ package_dir = Path(__file__).parent
45
+ bin_dir = package_dir / "bin"
46
+ bin_dir.mkdir(parents=True, exist_ok=True)
47
+
48
+ binary_name, local_name, url = get_binary_info()
49
+ binary_path = bin_dir / local_name
50
+
51
+ if binary_path.exists():
52
+ return binary_path
53
+
54
+ print("Downloading auto-editor binary for your platform...")
55
+ print(f"URL: {url}")
56
+
57
+ try:
58
+ urllib.request.urlretrieve(url, binary_path)
59
+ binary_path.chmod(0o755) # Make executable on Unix systems
60
+ print("Download completed successfully!")
61
+ return binary_path
62
+ except Exception as e:
63
+ print(f"Error downloading binary: {e}", file=sys.stderr)
64
+ print(f"Please download manually from: {url}", file=sys.stderr)
65
+ sys.exit(1)
66
+
8
67
 
9
68
  def main():
10
- """Run the auto-editor binary."""
11
- # Find the binary in the package directory
12
69
  package_dir = Path(__file__).parent
13
-
70
+
14
71
  # Determine the binary name based on platform
15
- if sys.platform.startswith('win'):
16
- binary_name = 'auto-editor.exe'
17
- else:
18
- binary_name = 'auto-editor'
19
-
20
- binary_path = package_dir / 'bin' / binary_name
21
-
72
+ _, local_name, _ = get_binary_info()
73
+ binary_path = package_dir / "bin" / local_name
74
+
75
+ # Download binary if it doesn't exist
22
76
  if not binary_path.exists():
23
- print(f"Error: auto-editor binary not found at {binary_path}", file=sys.stderr)
24
- sys.exit(1)
25
-
77
+ binary_path = download_binary()
78
+
26
79
  # Execute the binary with all arguments
27
80
  try:
28
81
  result = subprocess.run([str(binary_path)] + sys.argv[1:])
@@ -34,5 +87,5 @@ def main():
34
87
  sys.exit(1)
35
88
 
36
89
 
37
- if __name__ == '__main__':
38
- main()
90
+ if __name__ == "__main__":
91
+ main()
@@ -1,14 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: auto-editor
3
- Version: 29.0.1
3
+ Version: 29.0.3
4
4
  Summary: Auto-Editor: Effort free video editing!
5
5
  Author-email: WyattBlue <wyattblue@auto-editor.com>
6
6
  License-Expression: Unlicense
7
- Project-URL: Bug Tracker, https://github.com/WyattBlue/auto-editor/issues
7
+ Project-URL: Bug Tracker, https://github.com/WyattBlue/auto-editor/discussions
8
8
  Project-URL: Source Code, https://github.com/WyattBlue/auto-editor
9
9
  Project-URL: homepage, https://auto-editor.com
10
10
  Keywords: video,audio,media,editor,editing,processing,nonlinear,automatic,silence-detect,silence-removal,silence-speedup,motion-detection
11
- Requires-Python: >=3.10
11
+ Requires-Python: >=3.9
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
14
  Dynamic: license-file
@@ -0,0 +1,8 @@
1
+ auto_editor/__init__.py,sha256=vqjka5GoPRJ1f13kyUdmbq_ZSzQuMugLJ_XkX3atq00,23
2
+ auto_editor/__main__.py,sha256=NEMPzDOq8BoU5jHceffcDWRJ671j4mLEbGI3R7mBExM,2701
3
+ auto_editor-29.0.3.dist-info/licenses/LICENSE,sha256=yiq99pWITHfqS0pbZMp7cy2dnbreTuvBwudsU-njvIM,1210
4
+ auto_editor-29.0.3.dist-info/METADATA,sha256=voy__MI9aDa4VMRRWXwzOBAb6hIE54YgV0qMRwX5eYo,6106
5
+ auto_editor-29.0.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
6
+ auto_editor-29.0.3.dist-info/entry_points.txt,sha256=it1HC1zBLuXcGRxIGJIJTYg2Haw_30HBNDmIl2GykgQ,58
7
+ auto_editor-29.0.3.dist-info/top_level.txt,sha256=ky1HUkqq9i034c4CUU_0wBw0xZsxxyGEak1eTbdvpyA,12
8
+ auto_editor-29.0.3.dist-info/RECORD,,
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ auto-editor = auto_editor.__main__:main
auto_editor/cli.py DELETED
@@ -1,12 +0,0 @@
1
- """Command line interface for auto-editor."""
2
-
3
- from auto_editor.__main__ import main
4
-
5
-
6
- def cli():
7
- """Entry point for console script."""
8
- main()
9
-
10
-
11
- if __name__ == '__main__':
12
- cli()
@@ -1,9 +0,0 @@
1
- auto_editor/__init__.py,sha256=qlakouVENj5-oobwzJqlMUCXBEYN8ECI4D0jCzIRMrY,69
2
- auto_editor/__main__.py,sha256=SDmQnIvw-xh6BpbETdu0XHSq61GRKjyCMYxOVG4bOzc,1013
3
- auto_editor/cli.py,sha256=v6HorpGmMujYZdhXOL7MRgMvmP9b4kuk52ApVwC1c14,189
4
- auto_editor-29.0.1.dist-info/licenses/LICENSE,sha256=yiq99pWITHfqS0pbZMp7cy2dnbreTuvBwudsU-njvIM,1210
5
- auto_editor-29.0.1.dist-info/METADATA,sha256=5MUOwmin0Lqkw-RUKZzBwtL1J3XT9R4eeaj4dc9fUts,6102
6
- auto_editor-29.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
- auto_editor-29.0.1.dist-info/entry_points.txt,sha256=0AZmJPBhk0zxr2hhA1dEcl8ffyNgBso9RZzcx4JDMQQ,52
8
- auto_editor-29.0.1.dist-info/top_level.txt,sha256=ky1HUkqq9i034c4CUU_0wBw0xZsxxyGEak1eTbdvpyA,12
9
- auto_editor-29.0.1.dist-info/RECORD,,
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- auto-editor = auto_editor.cli:cli