Respect direct input path arguments
This commit is contained in:
@@ -58,6 +58,12 @@ Fuer automatisierte CLI-Laeufe kann das Encoding direkt gestartet werden:
|
||||
py -3 .\pvd_mezzanine.py --cli "C:\Pfad\zur\Quelle.mov"
|
||||
```
|
||||
|
||||
Alternativ kann die Datei direkt als erster Parameter uebergeben werden:
|
||||
|
||||
```powershell
|
||||
.\create_mezzanine.bat "C:\Pfad\zur\Quelle.mov"
|
||||
```
|
||||
|
||||
## Ausgabe
|
||||
|
||||
Das Script schreibt die fertige Mezzanine-Datei standardmäßig nach:
|
||||
|
||||
+6
-3
@@ -525,9 +525,6 @@ def run_cli(input_file: str, output_dir: str = OUTPUT_BASE_DIR) -> int:
|
||||
except Exception as exc:
|
||||
print(f"\nFEHLER: {exc}")
|
||||
return 1
|
||||
finally:
|
||||
if sys.stdin.isatty():
|
||||
os.system("pause")
|
||||
|
||||
|
||||
class MezzanineApp:
|
||||
@@ -762,6 +759,12 @@ Write-Output $open.FileName
|
||||
def main() -> int:
|
||||
if len(sys.argv) > 2 and sys.argv[1] == "--cli":
|
||||
return run_cli(sys.argv[2], OUTPUT_BASE_DIR)
|
||||
if len(sys.argv) > 1:
|
||||
input_file = sys.argv[1]
|
||||
if not os.path.isfile(input_file):
|
||||
print(f"FEHLER: Eingabedatei nicht gefunden: {input_file}")
|
||||
return 1
|
||||
return run_cli(input_file, OUTPUT_BASE_DIR)
|
||||
return run_ui()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user