Skip to content

Commit

Permalink
Revert "[build/screenshot] Add --skip-idle flag to take_for_each_step…
Browse files Browse the repository at this point in the history
….py"

This reverts commit 46dc4f3.
  • Loading branch information
MarcNumworks authored and PiaNumworks committed Apr 15, 2024
1 parent 1029815 commit 4a46b74
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
9 changes: 3 additions & 6 deletions build/screenshots/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,14 @@ def print_error(stderr, exit=True):
sys.exit(1)


def generate_all_screenshots(
state_file, executable, folder, skip_idle, exit_if_error=True
):
def generate_all_screenshots(state_file, executable, folder, exit_if_error=True):
print("Generating all screenshots of", state_file)
clean_or_create_folder(folder)
p = Popen(
"./"
+ executable
+ " --headless --load-state-file "
+ state_file
+ (" --skip-idle-screenshots " if skip_idle else "")
+ " --take-all-screenshots "
+ folder,
shell=True,
Expand Down Expand Up @@ -99,11 +96,11 @@ def folder_images(folder):


def generate_all_screenshots_and_create_gif(
state_file, executable, folder, skip_idle=False, exit_if_error=True
state_file, executable, folder, exit_if_error=True
):
clean_or_create_folder(folder)
list_images = generate_all_screenshots(
state_file, executable, folder_images(folder), skip_idle, exit_if_error
state_file, executable, folder_images(folder), exit_if_error
)
create_gif(list_images, folder)
return list_images
Expand Down
9 changes: 2 additions & 7 deletions build/screenshots/take_for_each_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,14 @@
help="state file (with extension .nws)",
)
parser.add_argument(
"-o", "--output-folder", default="screenshots_each_step", help="output folder"
)
parser.add_argument(
"--skip-idle",
action="store_true",
help="skip screenshots associated with idle events",
"-o", "--output_folder", default="screenshots_each_step", help="output folder"
)


def main():
args = parser.parse_args()
helper.generate_all_screenshots_and_create_gif(
args.state_file, args.executable, args.output_folder, args.skip_idle, False
args.state_file, args.executable, args.output_folder, False
)


Expand Down

0 comments on commit 4a46b74

Please sign in to comment.