Skip to content

Commit

Permalink
image-batch: Add task description.
Browse files Browse the repository at this point in the history
  • Loading branch information
hurtstotouchfire authored Jan 10, 2020
1 parent 2c48d5d commit a630613
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions image_batch/TASK.md
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit a630613

Please sign in to comment.