From a630613b7db589b2c356ab4cf0c60693809d99df Mon Sep 17 00:00:00 2001 From: Kelly Date: Fri, 10 Jan 2020 12:14:40 -0500 Subject: [PATCH] image-batch: Add task description. --- image_batch/TASK.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 image_batch/TASK.md diff --git a/image_batch/TASK.md b/image_batch/TASK.md new file mode 100644 index 0000000..a3aa81e --- /dev/null +++ b/image_batch/TASK.md @@ -0,0 +1,18 @@ +Given a set of png images, convert them to jpg using imagemagick. + +## Dry Run: +* List all files in the directory to get their filenames. Save in a list or array. +* Parse the filenames as strings, removing “.jpg”, to get the base filenames. +* Loop through all filenames and print the new filenames to stdout (i.e. “basename.png”) + +## Loop of 1: +* List only one file, by name, and save it to a list or array. +* Loop through the one file and run the system command to convert it using imagemagick (using the old and new filenames as args). +* Open the converted image and make sure it looks how you expected. + +## Final script: +* List all files in the directory to get their filenames. Save in a list or array. +* Parse the filenames as strings, removing “.jpg”, to get the base filenames. +* Loop through all of the files and run the system command to convert it using imagemagick (using the old and new filenames as args). +* List the directory to confirm the filenames and spot confirm images by opening. +