Needs more adjustments
This commit is contained in:
parent
4375262ab0
commit
446a914185
@ -68,6 +68,8 @@ def generate_concat(images, dest):
|
|||||||
for img in images:
|
for img in images:
|
||||||
content += f"\nfile {img}\nduration 8"
|
content += f"\nfile {img}\nduration 8"
|
||||||
|
|
||||||
|
content += "\nfile "+images[-1]
|
||||||
|
|
||||||
with open(dest, "w") as f:
|
with open(dest, "w") as f:
|
||||||
f.write(content)
|
f.write(content)
|
||||||
|
|
||||||
@ -103,12 +105,12 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
generate_images(sys.argv[1], sys.argv[2])
|
generate_images(sys.argv[1], sys.argv[2])
|
||||||
img_dir = os.path.dirname(sys.argv[2])
|
img_dir = os.path.dirname(sys.argv[2])
|
||||||
images = [
|
images = sorted([
|
||||||
img for img in os.listdir(img_dir) if img.startswith(os.path.basename(sys.argv[2])) and img.endswith(".png") and "short" not in img
|
img for img in os.listdir(img_dir) if img.startswith(os.path.basename(sys.argv[2])) and img.endswith(".png") and "short" not in img
|
||||||
]
|
])
|
||||||
short_images = [
|
short_images = sorted([
|
||||||
img for img in os.listdir(img_dir) if img.startswith(os.path.basename(sys.argv[2])) and img.endswith(".png") and "short" in img
|
img for img in os.listdir(img_dir) if img.startswith(os.path.basename(sys.argv[2])) and img.endswith(".png") and "short" in img
|
||||||
]
|
])
|
||||||
adjust_images([
|
adjust_images([
|
||||||
os.path.join(img_dir, img) for img in images
|
os.path.join(img_dir, img) for img in images
|
||||||
])
|
])
|
||||||
|
Loading…
Reference in New Issue
Block a user