Avoiding destructive down command when running all
This commit is contained in:
+10
-15
@@ -50,7 +50,7 @@ Examples:
|
||||
gnommo -p video1 transcode --processed --alpha-quality 0.5 More aggressive alpha compression
|
||||
gnommo -p video1 transcode --processed --dry-run Preview what would be compressed
|
||||
gnommo -p video1 transcode --force Re-transcode even if output already exists
|
||||
gnommo -p video1 all Full pipeline: down → import → preprocess → trim → stitch → render → push → handoff → up
|
||||
gnommo -p video1 all Full pipeline: import → preprocess → trim → stitch → render → push → handoff → up
|
||||
gnommo -p video1 render --dry-run Show FFmpeg command without running
|
||||
gnommo -p video1 description Generate YouTube description file
|
||||
gnommo -p video1 transcribe Narration file for timing of slides
|
||||
@@ -3178,7 +3178,7 @@ def cmd_all(
|
||||
res: str = "full",
|
||||
force: bool = False,
|
||||
) -> int:
|
||||
"""Run full pipeline: down → import → preprocess → trim → stitch → render → push → handoff → up.
|
||||
"""Run full pipeline: import → preprocess → trim → stitch → render → push → handoff → up.
|
||||
|
||||
Cascade rule: if any stage produces output, all subsequent stages are forced
|
||||
to re-run (cascade_force=True), regardless of whether --force was passed.
|
||||
@@ -3189,16 +3189,11 @@ def cmd_all(
|
||||
|
||||
print(f"=== Full Pipeline: {project_path.name} ===\n")
|
||||
|
||||
print(">>> Step 1/9: Download\n")
|
||||
result = cmd_sync(project_path, verbose, dry_run, download=True)
|
||||
if result != 0:
|
||||
return result
|
||||
|
||||
# cascade_force starts at --force. Once any stage does real work it flips to
|
||||
# True so all downstream stages re-run unconditionally.
|
||||
cascade_force = force
|
||||
|
||||
print("\n>>> Step 2/9: Import\n")
|
||||
print(">>> Step 1/8: Import\n")
|
||||
t0 = time.time()
|
||||
result = cmd_import(project_path, cascade_force, verbose)
|
||||
if result != 0:
|
||||
@@ -3208,7 +3203,7 @@ def cmd_all(
|
||||
):
|
||||
cascade_force = True
|
||||
|
||||
print("\n>>> Step 3/9: Preprocess\n")
|
||||
print("\n>>> Step 2/8: Preprocess\n")
|
||||
t0 = time.time()
|
||||
result = cmd_preprocess(
|
||||
project_path, verbose, dry_run, cascade_force, workers=1, res=res
|
||||
@@ -3220,7 +3215,7 @@ def cmd_all(
|
||||
) or _files_modified_since(project_path, t0, "*_processed.webm"):
|
||||
cascade_force = True
|
||||
|
||||
print("\n>>> Step 4/9: Trim\n")
|
||||
print("\n>>> Step 3/8: Trim\n")
|
||||
t0 = time.time()
|
||||
result = cmd_trim(project_path, verbose, force=cascade_force, threshold_db=-40.0)
|
||||
if result != 0:
|
||||
@@ -3229,7 +3224,7 @@ def cmd_all(
|
||||
if _files_modified_since(project_path, t0, "narration.json"):
|
||||
cascade_force = True
|
||||
|
||||
print("\n>>> Step 5/9: Stitch\n")
|
||||
print("\n>>> Step 4/8: Stitch\n")
|
||||
t0 = time.time()
|
||||
result = cmd_stitch(project_path, verbose, cascade_force, res=res)
|
||||
if result != 0:
|
||||
@@ -3237,22 +3232,22 @@ def cmd_all(
|
||||
if _files_modified_since(project_path, t0, "narration_combined.mov"):
|
||||
cascade_force = True
|
||||
|
||||
print("\n>>> Step 6/9: Render\n")
|
||||
print("\n>>> Step 5/8: Render\n")
|
||||
result = cmd_render(project_path, verbose, dry_run, res=res, force=cascade_force)
|
||||
if result != 0:
|
||||
return result
|
||||
|
||||
print("\n>>> Step 7/9: Push\n")
|
||||
print("\n>>> Step 6/8: Push\n")
|
||||
result = cmd_push(project_path, verbose, force=False, prod=True)
|
||||
if result != 0:
|
||||
return result
|
||||
|
||||
print("\n>>> Step 8/9: Handoff\n")
|
||||
print("\n>>> Step 7/8: Handoff\n")
|
||||
result = cmd_handoff(project_path, verbose, file_override=None, prod=True, res=res)
|
||||
if result != 0:
|
||||
return result
|
||||
|
||||
print("\n>>> Step 9/9: Upload\n")
|
||||
print("\n>>> Step 8/8: Upload\n")
|
||||
return cmd_sync(project_path, verbose, dry_run, download=False)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user