-
Notifications
You must be signed in to change notification settings - Fork 465
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[build/screenshots] Add create_gif.py script
- Loading branch information
1 parent
46dc4f3
commit fd16cf5
Showing
2 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import argparse | ||
import helper | ||
|
||
parser = argparse.ArgumentParser( | ||
description="This script creates a gif from a folder of screenshots" | ||
) | ||
parser.add_argument( | ||
"-o", "--output-folder", default="screenshots_each_step", help="output folder" | ||
) | ||
parser.add_argument( | ||
"--delay", | ||
type=int, | ||
default=350, | ||
help="delay in ms between images (default 350)", | ||
) | ||
parser.add_argument( | ||
"--end-delay", | ||
type=int, | ||
default=1750, | ||
help="delay in ms after the last image (default 1750)", | ||
) | ||
|
||
|
||
def main(): | ||
args = parser.parse_args() | ||
helper.create_gif( | ||
helper.list_images_in_folder(helper.folder_images(args.output_folder)), | ||
args.output_folder, | ||
delay=args.delay, | ||
end_delay=args.end_delay, | ||
) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters