diff --git a/exercises/inputs/3_files_and_commands/A/image_tiling.json b/exercises/inputs/3_files_and_commands/A/image_tiling.json new file mode 100644 index 0000000000000000000000000000000000000000..79aa69fd29402843791548b58abb6a649fba4be9 --- /dev/null +++ b/exercises/inputs/3_files_and_commands/A/image_tiling.json @@ -0,0 +1,140 @@ +{ + "name": "Image tiling", + "fws": [ + { + "fw_id": 1, + "name": "Render an image from a character", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["character"], + "outputs": ["image"], + "command_spec": { + "command": [ + "convert", "-size", "800x800", + "-background", "white", + "-pointsize", "800", + "-fill", "blue", + "-gravity", "Center", + "-trim" + ], + "character": { + "binding": { + "prefix": "caption", + "separator": ":" + }, + "source": { + "type": "data", + "value": "A" + } + }, + "image": { + "target": { + "type": "path", + "value": "/tmp/letter.png" + } + } + } + } + ] + } + }, + { + "fw_id": 2, + "name": "Tile the image into four tiles", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["image", "tiled image"], + "command_spec": { + "command": [ + "convert", + "-crop", "2x2@" + ], + "image": { + "source": "image" + }, + "tiled image": { + "source": { + "type": "data", + "value": "/tmp/tile.png" + } + } + } + } + ] + } + }, + { + "fw_id": 3, + "name": "Rotate one tile 90 degrees clockwise", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["rotation angle", "piece 2"], + "outputs": ["top left"], + "command_spec": { + "command": ["convert", "-rotate"], + "rotation angle": { + "source": { + "type": "data", + "value": 90 + } + }, + "top left": { + "target": { + "type": "path", + "value": "/tmp/piece-2.png" + } + }, + "piece 2": { + "source": "piece 2" + } + } + } + ], + "piece 2": { + "type": "path", + "value": "/tmp/tile-0.png" + } + } + }, + { + "fw_id": 4, + "name": "Flip another tile vertically", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["piece 1"], + "outputs": ["bottom right"], + "command_spec": { + "command": ["convert", "-flip"], + "bottom right": { + "target": { + "type": "path", + "value": "/tmp/piece-1.png" + } + }, + "piece 1": { + "source": "piece 1" + } + } + } + ], + "piece 1": { + "type": "path", + "value": "/tmp/tile-3.png" + } + } + } + ], + "links": { + "1": [2], + "2": [3, 4] + }, + "metadata": {} +} diff --git a/exercises/inputs/3_files_and_commands/A/letter.png b/exercises/inputs/3_files_and_commands/A/letter.png new file mode 100644 index 0000000000000000000000000000000000000000..e44ef681640261267f37fad784a1b06446552d60 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/A/letter.png differ diff --git a/exercises/inputs/3_files_and_commands/A/piece-1.png b/exercises/inputs/3_files_and_commands/A/piece-1.png index f035b2840e595cae557ab9e2c27060d031541210..f1ccb0f67f5fd1be8464ede3a8fb47ac7f43e16d 100644 Binary files a/exercises/inputs/3_files_and_commands/A/piece-1.png and b/exercises/inputs/3_files_and_commands/A/piece-1.png differ diff --git a/exercises/inputs/3_files_and_commands/A/piece-2.png b/exercises/inputs/3_files_and_commands/A/piece-2.png index 6eab055743f7f8a3b20e1e023714e28ad3690bd9..247b3e532e879b0ca28b975d3b9f998b7dbcde31 100644 Binary files a/exercises/inputs/3_files_and_commands/A/piece-2.png and b/exercises/inputs/3_files_and_commands/A/piece-2.png differ diff --git a/exercises/inputs/3_files_and_commands/A/tile-0.png b/exercises/inputs/3_files_and_commands/A/tile-0.png new file mode 100644 index 0000000000000000000000000000000000000000..0207495f4974e831b9d65c13bf2ad8c62a7c7da5 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/A/tile-0.png differ diff --git a/exercises/inputs/3_files_and_commands/A/tile-1.png b/exercises/inputs/3_files_and_commands/A/tile-1.png new file mode 100644 index 0000000000000000000000000000000000000000..0f721fbe99612def82c48a01354c77cae8217fc6 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/A/tile-1.png differ diff --git a/exercises/inputs/3_files_and_commands/A/tile-2.png b/exercises/inputs/3_files_and_commands/A/tile-2.png new file mode 100644 index 0000000000000000000000000000000000000000..f8d9e46685f5abcc5006f5ada90624fd261db457 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/A/tile-2.png differ diff --git a/exercises/inputs/3_files_and_commands/A/tile-3.png b/exercises/inputs/3_files_and_commands/A/tile-3.png new file mode 100644 index 0000000000000000000000000000000000000000..8ac7064a672e9ad30f67ae552215d8734c7525ba Binary files /dev/null and b/exercises/inputs/3_files_and_commands/A/tile-3.png differ diff --git a/exercises/inputs/3_files_and_commands/C/image_tiling.json b/exercises/inputs/3_files_and_commands/C/image_tiling.json new file mode 100644 index 0000000000000000000000000000000000000000..887ba9e886d6b9777da9c7280fc6933e01351888 --- /dev/null +++ b/exercises/inputs/3_files_and_commands/C/image_tiling.json @@ -0,0 +1,140 @@ +{ + "name": "Image tiling", + "fws": [ + { + "fw_id": 1, + "name": "Render an image from a character", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["character"], + "outputs": ["image"], + "command_spec": { + "command": [ + "convert", "-size", "800x800", + "-background", "white", + "-pointsize", "800", + "-fill", "blue", + "-gravity", "Center", + "-trim" + ], + "character": { + "binding": { + "prefix": "caption", + "separator": ":" + }, + "source": { + "type": "data", + "value": "C" + } + }, + "image": { + "target": { + "type": "path", + "value": "/tmp/letter.png" + } + } + } + } + ] + } + }, + { + "fw_id": 2, + "name": "Tile the image into four tiles", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["image", "tiled image"], + "command_spec": { + "command": [ + "convert", + "-crop", "2x2@" + ], + "image": { + "source": "image" + }, + "tiled image": { + "source": { + "type": "data", + "value": "/tmp/tile.png" + } + } + } + } + ] + } + }, + { + "fw_id": 3, + "name": "Rotate one tile 90 degrees clockwise", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["rotation angle", "piece 2"], + "outputs": ["top left"], + "command_spec": { + "command": ["convert", "-rotate"], + "rotation angle": { + "source": { + "type": "data", + "value": 90 + } + }, + "top left": { + "target": { + "type": "path", + "value": "/tmp/piece-2.png" + } + }, + "piece 2": { + "source": "piece 2" + } + } + } + ], + "piece 2": { + "type": "path", + "value": "/tmp/tile-0.png" + } + } + }, + { + "fw_id": 4, + "name": "Flip another tile vertically", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["piece 1"], + "outputs": ["bottom right"], + "command_spec": { + "command": ["convert", "-flip"], + "bottom right": { + "target": { + "type": "path", + "value": "/tmp/piece-1.png" + } + }, + "piece 1": { + "source": "piece 1" + } + } + } + ], + "piece 1": { + "type": "path", + "value": "/tmp/tile-3.png" + } + } + } + ], + "links": { + "1": [2], + "2": [3, 4] + }, + "metadata": {} +} diff --git a/exercises/inputs/3_files_and_commands/C/letter.png b/exercises/inputs/3_files_and_commands/C/letter.png new file mode 100644 index 0000000000000000000000000000000000000000..c0451f1e5bb044965eaf59184b40d0bbfdcb4a62 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/C/letter.png differ diff --git a/exercises/inputs/3_files_and_commands/C/piece-1.png b/exercises/inputs/3_files_and_commands/C/piece-1.png new file mode 100644 index 0000000000000000000000000000000000000000..347552477e389f079ef41c7e4f61824acc098ec9 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/C/piece-1.png differ diff --git a/exercises/inputs/3_files_and_commands/C/piece-2.png b/exercises/inputs/3_files_and_commands/C/piece-2.png new file mode 100644 index 0000000000000000000000000000000000000000..86ab59d1705bb3af9f7434cb10b7c14863e7ec72 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/C/piece-2.png differ diff --git a/exercises/inputs/3_files_and_commands/C/tile-0.png b/exercises/inputs/3_files_and_commands/C/tile-0.png new file mode 100644 index 0000000000000000000000000000000000000000..5f32451612ff6d497c3dc89a81442e504c8f8458 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/C/tile-0.png differ diff --git a/exercises/inputs/3_files_and_commands/C/tile-1.png b/exercises/inputs/3_files_and_commands/C/tile-1.png new file mode 100644 index 0000000000000000000000000000000000000000..4607d5cec11684d11e9ffc79bf86098f10300b44 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/C/tile-1.png differ diff --git a/exercises/inputs/3_files_and_commands/C/tile-2.png b/exercises/inputs/3_files_and_commands/C/tile-2.png new file mode 100644 index 0000000000000000000000000000000000000000..53090e547c621e85a2d860182dab4fe252414f3a Binary files /dev/null and b/exercises/inputs/3_files_and_commands/C/tile-2.png differ diff --git a/exercises/inputs/3_files_and_commands/C/tile-3.png b/exercises/inputs/3_files_and_commands/C/tile-3.png new file mode 100644 index 0000000000000000000000000000000000000000..7c08e5bb0b49ec01d7a729e23d4d64cfb0272b1f Binary files /dev/null and b/exercises/inputs/3_files_and_commands/C/tile-3.png differ diff --git a/exercises/inputs/3_files_and_commands/D/image_tiling.json b/exercises/inputs/3_files_and_commands/D/image_tiling.json new file mode 100644 index 0000000000000000000000000000000000000000..c06720c918d7008024b98ab5ec696af69c9593da --- /dev/null +++ b/exercises/inputs/3_files_and_commands/D/image_tiling.json @@ -0,0 +1,140 @@ +{ + "name": "Image tiling", + "fws": [ + { + "fw_id": 1, + "name": "Render an image from a character", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["character"], + "outputs": ["image"], + "command_spec": { + "command": [ + "convert", "-size", "800x800", + "-background", "white", + "-pointsize", "800", + "-fill", "blue", + "-gravity", "Center", + "-trim" + ], + "character": { + "binding": { + "prefix": "caption", + "separator": ":" + }, + "source": { + "type": "data", + "value": "D" + } + }, + "image": { + "target": { + "type": "path", + "value": "/tmp/letter.png" + } + } + } + } + ] + } + }, + { + "fw_id": 2, + "name": "Tile the image into four tiles", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["image", "tiled image"], + "command_spec": { + "command": [ + "convert", + "-crop", "2x2@" + ], + "image": { + "source": "image" + }, + "tiled image": { + "source": { + "type": "data", + "value": "/tmp/tile.png" + } + } + } + } + ] + } + }, + { + "fw_id": 3, + "name": "Rotate one tile 90 degrees clockwise", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["rotation angle", "piece 2"], + "outputs": ["top left"], + "command_spec": { + "command": ["convert", "-rotate"], + "rotation angle": { + "source": { + "type": "data", + "value": 90 + } + }, + "top left": { + "target": { + "type": "path", + "value": "/tmp/piece-2.png" + } + }, + "piece 2": { + "source": "piece 2" + } + } + } + ], + "piece 2": { + "type": "path", + "value": "/tmp/tile-0.png" + } + } + }, + { + "fw_id": 4, + "name": "Flip another tile vertically", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["piece 1"], + "outputs": ["bottom right"], + "command_spec": { + "command": ["convert", "-flip"], + "bottom right": { + "target": { + "type": "path", + "value": "/tmp/piece-1.png" + } + }, + "piece 1": { + "source": "piece 1" + } + } + } + ], + "piece 1": { + "type": "path", + "value": "/tmp/tile-3.png" + } + } + } + ], + "links": { + "1": [2], + "2": [3, 4] + }, + "metadata": {} +} diff --git a/exercises/inputs/3_files_and_commands/D/letter.png b/exercises/inputs/3_files_and_commands/D/letter.png new file mode 100644 index 0000000000000000000000000000000000000000..2af5059a94849c05c91edb43b031cf768dbbe6b9 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/D/letter.png differ diff --git a/exercises/inputs/3_files_and_commands/D/piece-1.png b/exercises/inputs/3_files_and_commands/D/piece-1.png new file mode 100644 index 0000000000000000000000000000000000000000..787f060544122e57a708864045cbd237c0ee28f6 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/D/piece-1.png differ diff --git a/exercises/inputs/3_files_and_commands/D/piece-2.png b/exercises/inputs/3_files_and_commands/D/piece-2.png new file mode 100644 index 0000000000000000000000000000000000000000..a6760161ecc29f7f1f87f88875bbf7268ad2c7f6 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/D/piece-2.png differ diff --git a/exercises/inputs/3_files_and_commands/D/tile-0.png b/exercises/inputs/3_files_and_commands/D/tile-0.png new file mode 100644 index 0000000000000000000000000000000000000000..ec1838d38080516857daac5fc2c9840510d54f55 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/D/tile-0.png differ diff --git a/exercises/inputs/3_files_and_commands/D/tile-1.png b/exercises/inputs/3_files_and_commands/D/tile-1.png new file mode 100644 index 0000000000000000000000000000000000000000..b4832d446caf444df8f7876b1eabcfdb2e39d013 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/D/tile-1.png differ diff --git a/exercises/inputs/3_files_and_commands/D/tile-2.png b/exercises/inputs/3_files_and_commands/D/tile-2.png new file mode 100644 index 0000000000000000000000000000000000000000..ac4660c723502de63009ff802dca866409312ae4 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/D/tile-2.png differ diff --git a/exercises/inputs/3_files_and_commands/D/tile-3.png b/exercises/inputs/3_files_and_commands/D/tile-3.png new file mode 100644 index 0000000000000000000000000000000000000000..9a98e07fd9e2d273cd6ee901db20ffb62a0cb859 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/D/tile-3.png differ diff --git a/exercises/inputs/3_files_and_commands/E/image_tiling.json b/exercises/inputs/3_files_and_commands/E/image_tiling.json new file mode 100644 index 0000000000000000000000000000000000000000..a1f0f311ef0c34b4e9de9a4efcfb536f2e0d8559 --- /dev/null +++ b/exercises/inputs/3_files_and_commands/E/image_tiling.json @@ -0,0 +1,140 @@ +{ + "name": "Image tiling", + "fws": [ + { + "fw_id": 1, + "name": "Render an image from a character", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["character"], + "outputs": ["image"], + "command_spec": { + "command": [ + "convert", "-size", "800x800", + "-background", "white", + "-pointsize", "800", + "-fill", "blue", + "-gravity", "Center", + "-trim" + ], + "character": { + "binding": { + "prefix": "caption", + "separator": ":" + }, + "source": { + "type": "data", + "value": "E" + } + }, + "image": { + "target": { + "type": "path", + "value": "/tmp/letter.png" + } + } + } + } + ] + } + }, + { + "fw_id": 2, + "name": "Tile the image into four tiles", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["image", "tiled image"], + "command_spec": { + "command": [ + "convert", + "-crop", "2x2@" + ], + "image": { + "source": "image" + }, + "tiled image": { + "source": { + "type": "data", + "value": "/tmp/tile.png" + } + } + } + } + ] + } + }, + { + "fw_id": 3, + "name": "Rotate one tile 90 degrees clockwise", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["rotation angle", "piece 2"], + "outputs": ["top left"], + "command_spec": { + "command": ["convert", "-rotate"], + "rotation angle": { + "source": { + "type": "data", + "value": 90 + } + }, + "top left": { + "target": { + "type": "path", + "value": "/tmp/piece-2.png" + } + }, + "piece 2": { + "source": "piece 2" + } + } + } + ], + "piece 2": { + "type": "path", + "value": "/tmp/tile-0.png" + } + } + }, + { + "fw_id": 4, + "name": "Flip another tile vertically", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["piece 1"], + "outputs": ["bottom right"], + "command_spec": { + "command": ["convert", "-flip"], + "bottom right": { + "target": { + "type": "path", + "value": "/tmp/piece-1.png" + } + }, + "piece 1": { + "source": "piece 1" + } + } + } + ], + "piece 1": { + "type": "path", + "value": "/tmp/tile-3.png" + } + } + } + ], + "links": { + "1": [2], + "2": [3, 4] + }, + "metadata": {} +} diff --git a/exercises/inputs/3_files_and_commands/E/letter.png b/exercises/inputs/3_files_and_commands/E/letter.png new file mode 100644 index 0000000000000000000000000000000000000000..76a229b925782106d1f539c57a5632635fdebe14 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/E/letter.png differ diff --git a/exercises/inputs/3_files_and_commands/E/piece-1.png b/exercises/inputs/3_files_and_commands/E/piece-1.png new file mode 100644 index 0000000000000000000000000000000000000000..562d08b651ef90d177f391a976868f90bf968ee1 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/E/piece-1.png differ diff --git a/exercises/inputs/3_files_and_commands/E/piece-2.png b/exercises/inputs/3_files_and_commands/E/piece-2.png new file mode 100644 index 0000000000000000000000000000000000000000..c3ae442ba01b6ac5434f46ec4422a445dd193a95 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/E/piece-2.png differ diff --git a/exercises/inputs/3_files_and_commands/E/tile-0.png b/exercises/inputs/3_files_and_commands/E/tile-0.png new file mode 100644 index 0000000000000000000000000000000000000000..bc22db992d1867c29ba92d0f6fedab5ac2e3210e Binary files /dev/null and b/exercises/inputs/3_files_and_commands/E/tile-0.png differ diff --git a/exercises/inputs/3_files_and_commands/E/tile-1.png b/exercises/inputs/3_files_and_commands/E/tile-1.png new file mode 100644 index 0000000000000000000000000000000000000000..ba896da08f1b05c1930da05274050e9bab596216 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/E/tile-1.png differ diff --git a/exercises/inputs/3_files_and_commands/E/tile-2.png b/exercises/inputs/3_files_and_commands/E/tile-2.png new file mode 100644 index 0000000000000000000000000000000000000000..f63e870b4e4f01c6a06a315a9e8f40d10c80a77f Binary files /dev/null and b/exercises/inputs/3_files_and_commands/E/tile-2.png differ diff --git a/exercises/inputs/3_files_and_commands/E/tile-3.png b/exercises/inputs/3_files_and_commands/E/tile-3.png new file mode 100644 index 0000000000000000000000000000000000000000..bcf8802ddff7cddd1edb52207242e4fa2abdffe1 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/E/tile-3.png differ diff --git a/exercises/inputs/3_files_and_commands/H/image_tiling.json b/exercises/inputs/3_files_and_commands/H/image_tiling.json new file mode 100644 index 0000000000000000000000000000000000000000..3d1b54d25d672b847cc3feb80e3fbc907b11fe6c --- /dev/null +++ b/exercises/inputs/3_files_and_commands/H/image_tiling.json @@ -0,0 +1,140 @@ +{ + "name": "Image tiling", + "fws": [ + { + "fw_id": 1, + "name": "Render an image from a character", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["character"], + "outputs": ["image"], + "command_spec": { + "command": [ + "convert", "-size", "800x800", + "-background", "white", + "-pointsize", "800", + "-fill", "blue", + "-gravity", "Center", + "-trim" + ], + "character": { + "binding": { + "prefix": "caption", + "separator": ":" + }, + "source": { + "type": "data", + "value": "H" + } + }, + "image": { + "target": { + "type": "path", + "value": "/tmp/letter.png" + } + } + } + } + ] + } + }, + { + "fw_id": 2, + "name": "Tile the image into four tiles", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["image", "tiled image"], + "command_spec": { + "command": [ + "convert", + "-crop", "2x2@" + ], + "image": { + "source": "image" + }, + "tiled image": { + "source": { + "type": "data", + "value": "/tmp/tile.png" + } + } + } + } + ] + } + }, + { + "fw_id": 3, + "name": "Rotate one tile 90 degrees clockwise", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["rotation angle", "piece 2"], + "outputs": ["top left"], + "command_spec": { + "command": ["convert", "-rotate"], + "rotation angle": { + "source": { + "type": "data", + "value": 90 + } + }, + "top left": { + "target": { + "type": "path", + "value": "/tmp/piece-2.png" + } + }, + "piece 2": { + "source": "piece 2" + } + } + } + ], + "piece 2": { + "type": "path", + "value": "/tmp/tile-0.png" + } + } + }, + { + "fw_id": 4, + "name": "Flip another tile vertically", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["piece 1"], + "outputs": ["bottom right"], + "command_spec": { + "command": ["convert", "-flip"], + "bottom right": { + "target": { + "type": "path", + "value": "/tmp/piece-1.png" + } + }, + "piece 1": { + "source": "piece 1" + } + } + } + ], + "piece 1": { + "type": "path", + "value": "/tmp/tile-3.png" + } + } + } + ], + "links": { + "1": [2], + "2": [3, 4] + }, + "metadata": {} +} diff --git a/exercises/inputs/3_files_and_commands/H/letter.png b/exercises/inputs/3_files_and_commands/H/letter.png new file mode 100644 index 0000000000000000000000000000000000000000..498dbd0d5188381b00e72e22131115497b47e3c6 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/H/letter.png differ diff --git a/exercises/inputs/3_files_and_commands/H/piece-1.png b/exercises/inputs/3_files_and_commands/H/piece-1.png new file mode 100644 index 0000000000000000000000000000000000000000..e849c495224be9bd257aa95d2e5ec4d140abbd28 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/H/piece-1.png differ diff --git a/exercises/inputs/3_files_and_commands/H/piece-2.png b/exercises/inputs/3_files_and_commands/H/piece-2.png new file mode 100644 index 0000000000000000000000000000000000000000..3f749b9af87bf6e285963dc67e04886d939a2beb Binary files /dev/null and b/exercises/inputs/3_files_and_commands/H/piece-2.png differ diff --git a/exercises/inputs/3_files_and_commands/H/tile-0.png b/exercises/inputs/3_files_and_commands/H/tile-0.png new file mode 100644 index 0000000000000000000000000000000000000000..b5af3e8cbc4df9140bdeabe1c645b7487f8c6ddf Binary files /dev/null and b/exercises/inputs/3_files_and_commands/H/tile-0.png differ diff --git a/exercises/inputs/3_files_and_commands/H/tile-1.png b/exercises/inputs/3_files_and_commands/H/tile-1.png new file mode 100644 index 0000000000000000000000000000000000000000..5ba08c338ef2c7bb30d1990c79965a3560046534 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/H/tile-1.png differ diff --git a/exercises/inputs/3_files_and_commands/H/tile-2.png b/exercises/inputs/3_files_and_commands/H/tile-2.png new file mode 100644 index 0000000000000000000000000000000000000000..af54a5ff428d6b8044704059b92daa5ca985c831 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/H/tile-2.png differ diff --git a/exercises/inputs/3_files_and_commands/H/tile-3.png b/exercises/inputs/3_files_and_commands/H/tile-3.png new file mode 100644 index 0000000000000000000000000000000000000000..c6437c3512a4e862b00bf75e6ecf40a0696d43c4 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/H/tile-3.png differ diff --git a/exercises/inputs/3_files_and_commands/M/image_tiling.json b/exercises/inputs/3_files_and_commands/M/image_tiling.json new file mode 100644 index 0000000000000000000000000000000000000000..9df345626bd1bc2dfc472739daab8c413e993fcd --- /dev/null +++ b/exercises/inputs/3_files_and_commands/M/image_tiling.json @@ -0,0 +1,140 @@ +{ + "name": "Image tiling", + "fws": [ + { + "fw_id": 1, + "name": "Render an image from a character", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["character"], + "outputs": ["image"], + "command_spec": { + "command": [ + "convert", "-size", "800x800", + "-background", "white", + "-pointsize", "800", + "-fill", "blue", + "-gravity", "Center", + "-trim" + ], + "character": { + "binding": { + "prefix": "caption", + "separator": ":" + }, + "source": { + "type": "data", + "value": "M" + } + }, + "image": { + "target": { + "type": "path", + "value": "/tmp/letter.png" + } + } + } + } + ] + } + }, + { + "fw_id": 2, + "name": "Tile the image into four tiles", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["image", "tiled image"], + "command_spec": { + "command": [ + "convert", + "-crop", "2x2@" + ], + "image": { + "source": "image" + }, + "tiled image": { + "source": { + "type": "data", + "value": "/tmp/tile.png" + } + } + } + } + ] + } + }, + { + "fw_id": 3, + "name": "Rotate one tile 90 degrees clockwise", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["rotation angle", "piece 2"], + "outputs": ["top left"], + "command_spec": { + "command": ["convert", "-rotate"], + "rotation angle": { + "source": { + "type": "data", + "value": 90 + } + }, + "top left": { + "target": { + "type": "path", + "value": "/tmp/piece-2.png" + } + }, + "piece 2": { + "source": "piece 2" + } + } + } + ], + "piece 2": { + "type": "path", + "value": "/tmp/tile-0.png" + } + } + }, + { + "fw_id": 4, + "name": "Flip another tile vertically", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["piece 1"], + "outputs": ["bottom right"], + "command_spec": { + "command": ["convert", "-flip"], + "bottom right": { + "target": { + "type": "path", + "value": "/tmp/piece-1.png" + } + }, + "piece 1": { + "source": "piece 1" + } + } + } + ], + "piece 1": { + "type": "path", + "value": "/tmp/tile-3.png" + } + } + } + ], + "links": { + "1": [2], + "2": [3, 4] + }, + "metadata": {} +} diff --git a/exercises/inputs/3_files_and_commands/M/letter.png b/exercises/inputs/3_files_and_commands/M/letter.png new file mode 100644 index 0000000000000000000000000000000000000000..87097fdaa071d7114b5ccca0ab98b7b3fa999077 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/M/letter.png differ diff --git a/exercises/inputs/3_files_and_commands/M/piece-1.png b/exercises/inputs/3_files_and_commands/M/piece-1.png new file mode 100644 index 0000000000000000000000000000000000000000..fd89acccccd263a297aa478a714bba57160fe69d Binary files /dev/null and b/exercises/inputs/3_files_and_commands/M/piece-1.png differ diff --git a/exercises/inputs/3_files_and_commands/M/piece-2.png b/exercises/inputs/3_files_and_commands/M/piece-2.png new file mode 100644 index 0000000000000000000000000000000000000000..50abc83d970ff17100c5f917903ff3394761a29b Binary files /dev/null and b/exercises/inputs/3_files_and_commands/M/piece-2.png differ diff --git a/exercises/inputs/3_files_and_commands/M/tile-0.png b/exercises/inputs/3_files_and_commands/M/tile-0.png new file mode 100644 index 0000000000000000000000000000000000000000..d6683ae1874f12777fb29b6b799619d0a2bd6d11 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/M/tile-0.png differ diff --git a/exercises/inputs/3_files_and_commands/M/tile-1.png b/exercises/inputs/3_files_and_commands/M/tile-1.png new file mode 100644 index 0000000000000000000000000000000000000000..e802aacac4e0aca1539b0bcd79064d6dbc3bf18a Binary files /dev/null and b/exercises/inputs/3_files_and_commands/M/tile-1.png differ diff --git a/exercises/inputs/3_files_and_commands/M/tile-2.png b/exercises/inputs/3_files_and_commands/M/tile-2.png new file mode 100644 index 0000000000000000000000000000000000000000..e497c5925649434dbed55909910f66d48c188604 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/M/tile-2.png differ diff --git a/exercises/inputs/3_files_and_commands/M/tile-3.png b/exercises/inputs/3_files_and_commands/M/tile-3.png new file mode 100644 index 0000000000000000000000000000000000000000..a1beb9b3b8db8410244cb18eff1e09d1dee83c33 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/M/tile-3.png differ diff --git a/exercises/inputs/3_files_and_commands/N/image_tiling.json b/exercises/inputs/3_files_and_commands/N/image_tiling.json new file mode 100644 index 0000000000000000000000000000000000000000..c842b5ad134201ac7a9d0e61d45f3742e03f2dce --- /dev/null +++ b/exercises/inputs/3_files_and_commands/N/image_tiling.json @@ -0,0 +1,140 @@ +{ + "name": "Image tiling", + "fws": [ + { + "fw_id": 1, + "name": "Render an image from a character", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["character"], + "outputs": ["image"], + "command_spec": { + "command": [ + "convert", "-size", "800x800", + "-background", "white", + "-pointsize", "800", + "-fill", "blue", + "-gravity", "Center", + "-trim" + ], + "character": { + "binding": { + "prefix": "caption", + "separator": ":" + }, + "source": { + "type": "data", + "value": "N" + } + }, + "image": { + "target": { + "type": "path", + "value": "/tmp/letter.png" + } + } + } + } + ] + } + }, + { + "fw_id": 2, + "name": "Tile the image into four tiles", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["image", "tiled image"], + "command_spec": { + "command": [ + "convert", + "-crop", "2x2@" + ], + "image": { + "source": "image" + }, + "tiled image": { + "source": { + "type": "data", + "value": "/tmp/tile.png" + } + } + } + } + ] + } + }, + { + "fw_id": 3, + "name": "Rotate one tile 90 degrees clockwise", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["rotation angle", "piece 2"], + "outputs": ["top left"], + "command_spec": { + "command": ["convert", "-rotate"], + "rotation angle": { + "source": { + "type": "data", + "value": 90 + } + }, + "top left": { + "target": { + "type": "path", + "value": "/tmp/piece-2.png" + } + }, + "piece 2": { + "source": "piece 2" + } + } + } + ], + "piece 2": { + "type": "path", + "value": "/tmp/tile-0.png" + } + } + }, + { + "fw_id": 4, + "name": "Flip another tile vertically", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["piece 1"], + "outputs": ["bottom left"], + "command_spec": { + "command": ["convert", "-flip"], + "bottom left": { + "target": { + "type": "path", + "value": "/tmp/piece-1.png" + } + }, + "piece 1": { + "source": "piece 1" + } + } + } + ], + "piece 1": { + "type": "path", + "value": "/tmp/tile-2.png" + } + } + } + ], + "links": { + "1": [2], + "2": [3, 4] + }, + "metadata": {} +} diff --git a/exercises/inputs/3_files_and_commands/N/letter.png b/exercises/inputs/3_files_and_commands/N/letter.png new file mode 100644 index 0000000000000000000000000000000000000000..9bc20ea871ad929f0af3a0dbf9eb06b4483dc395 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/N/letter.png differ diff --git a/exercises/inputs/3_files_and_commands/N/piece-1.png b/exercises/inputs/3_files_and_commands/N/piece-1.png new file mode 100644 index 0000000000000000000000000000000000000000..16a3267088932e5ad023f5a4de64b015069b0afb Binary files /dev/null and b/exercises/inputs/3_files_and_commands/N/piece-1.png differ diff --git a/exercises/inputs/3_files_and_commands/N/piece-2.png b/exercises/inputs/3_files_and_commands/N/piece-2.png new file mode 100644 index 0000000000000000000000000000000000000000..d256c1f957552595c9f9e8565715a593e6e8ddd8 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/N/piece-2.png differ diff --git a/exercises/inputs/3_files_and_commands/N/tile-0.png b/exercises/inputs/3_files_and_commands/N/tile-0.png new file mode 100644 index 0000000000000000000000000000000000000000..30ea36f56ad492ac5c403e0ae56e6b88bf80c784 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/N/tile-0.png differ diff --git a/exercises/inputs/3_files_and_commands/N/tile-1.png b/exercises/inputs/3_files_and_commands/N/tile-1.png new file mode 100644 index 0000000000000000000000000000000000000000..7f70835c2c4768f64aaaf1bbee19d6c4596e1541 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/N/tile-1.png differ diff --git a/exercises/inputs/3_files_and_commands/N/tile-2.png b/exercises/inputs/3_files_and_commands/N/tile-2.png new file mode 100644 index 0000000000000000000000000000000000000000..09750c6bf443952d1775c86e70bb8d2b9295ffe9 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/N/tile-2.png differ diff --git a/exercises/inputs/3_files_and_commands/N/tile-3.png b/exercises/inputs/3_files_and_commands/N/tile-3.png new file mode 100644 index 0000000000000000000000000000000000000000..6c55f62abbb732725054def3e34fc6676696e075 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/N/tile-3.png differ diff --git a/exercises/inputs/3_files_and_commands/O/image_tiling.json b/exercises/inputs/3_files_and_commands/O/image_tiling.json new file mode 100644 index 0000000000000000000000000000000000000000..bda0e93a65f7304828205ab97f94778e6f80d3f2 --- /dev/null +++ b/exercises/inputs/3_files_and_commands/O/image_tiling.json @@ -0,0 +1,111 @@ +{ + "name": "Image tiling", + "fws": [ + { + "fw_id": 1, + "name": "Render an image from a character", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["character"], + "outputs": ["image"], + "command_spec": { + "command": [ + "convert", "-size", "800x800", + "-background", "white", + "-pointsize", "800", + "-fill", "blue", + "-gravity", "Center", + "-trim" + ], + "character": { + "binding": { + "prefix": "caption", + "separator": ":" + }, + "source": { + "type": "data", + "value": "O" + } + }, + "image": { + "target": { + "type": "path", + "value": "/tmp/letter.png" + } + } + } + } + ] + } + }, + { + "fw_id": 2, + "name": "Tile the image into four tiles", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["image", "tiled image"], + "command_spec": { + "command": [ + "convert", + "-crop", "2x2@" + ], + "image": { + "source": "image" + }, + "tiled image": { + "source": { + "type": "data", + "value": "/tmp/tile.png" + } + } + } + } + ] + } + }, + { + "fw_id": 3, + "name": "Rotate one tile 90 degrees clockwise", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["rotation angle", "piece 1"], + "outputs": ["top left"], + "command_spec": { + "command": ["convert", "-rotate"], + "rotation angle": { + "source": { + "type": "data", + "value": 90 + } + }, + "top left": { + "target": { + "type": "path", + "value": "/tmp/piece-1.png" + } + }, + "piece 1": { + "source": "piece 1" + } + } + } + ], + "piece 1": { + "type": "path", + "value": "/tmp/tile-0.png" + } + } + } + ], + "links": { + "1": [2], + "2": [3] + }, + "metadata": {} +} diff --git a/exercises/inputs/3_files_and_commands/O/letter.png b/exercises/inputs/3_files_and_commands/O/letter.png new file mode 100644 index 0000000000000000000000000000000000000000..97166f2e55d6ef3a5ec3a8ba42a6d7b04665dc73 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/O/letter.png differ diff --git a/exercises/inputs/3_files_and_commands/O/piece-1.png b/exercises/inputs/3_files_and_commands/O/piece-1.png new file mode 100644 index 0000000000000000000000000000000000000000..7d4adf113bba5c41dfedaeffa8de5820271735e7 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/O/piece-1.png differ diff --git a/exercises/inputs/3_files_and_commands/O/tile-0.png b/exercises/inputs/3_files_and_commands/O/tile-0.png new file mode 100644 index 0000000000000000000000000000000000000000..cf6807fe74f7c329ebdfa53d00531c58462560ea Binary files /dev/null and b/exercises/inputs/3_files_and_commands/O/tile-0.png differ diff --git a/exercises/inputs/3_files_and_commands/O/tile-1.png b/exercises/inputs/3_files_and_commands/O/tile-1.png new file mode 100644 index 0000000000000000000000000000000000000000..ddffc77a3b31f46e91213b5758dab568b0b81876 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/O/tile-1.png differ diff --git a/exercises/inputs/3_files_and_commands/O/tile-2.png b/exercises/inputs/3_files_and_commands/O/tile-2.png new file mode 100644 index 0000000000000000000000000000000000000000..3f66b899629791350f703940ac71415acc8b135a Binary files /dev/null and b/exercises/inputs/3_files_and_commands/O/tile-2.png differ diff --git a/exercises/inputs/3_files_and_commands/O/tile-3.png b/exercises/inputs/3_files_and_commands/O/tile-3.png new file mode 100644 index 0000000000000000000000000000000000000000..e0945441ccf5d4f0de3e1d6e7f7d8b87111e4d24 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/O/tile-3.png differ diff --git a/exercises/inputs/3_files_and_commands/S/image_tiling.json b/exercises/inputs/3_files_and_commands/S/image_tiling.json new file mode 100644 index 0000000000000000000000000000000000000000..72a4fafe55fa828ec349ce45eaafae0c952a374e --- /dev/null +++ b/exercises/inputs/3_files_and_commands/S/image_tiling.json @@ -0,0 +1,140 @@ +{ + "name": "Image tiling", + "fws": [ + { + "fw_id": 1, + "name": "Render an image from a character", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["character"], + "outputs": ["image"], + "command_spec": { + "command": [ + "convert", "-size", "800x800", + "-background", "white", + "-pointsize", "800", + "-fill", "blue", + "-gravity", "Center", + "-trim" + ], + "character": { + "binding": { + "prefix": "caption", + "separator": ":" + }, + "source": { + "type": "data", + "value": "S" + } + }, + "image": { + "target": { + "type": "path", + "value": "/tmp/letter.png" + } + } + } + } + ] + } + }, + { + "fw_id": 2, + "name": "Tile the image into four tiles", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["image", "tiled image"], + "command_spec": { + "command": [ + "convert", + "-crop", "2x2@" + ], + "image": { + "source": "image" + }, + "tiled image": { + "source": { + "type": "data", + "value": "/tmp/tile.png" + } + } + } + } + ] + } + }, + { + "fw_id": 3, + "name": "Rotate one tile 90 degrees clockwise", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["rotation angle", "piece 2"], + "outputs": ["top left"], + "command_spec": { + "command": ["convert", "-rotate"], + "rotation angle": { + "source": { + "type": "data", + "value": 90 + } + }, + "top left": { + "target": { + "type": "path", + "value": "/tmp/piece-2.png" + } + }, + "piece 2": { + "source": "piece 2" + } + } + } + ], + "piece 2": { + "type": "path", + "value": "/tmp/tile-0.png" + } + } + }, + { + "fw_id": 4, + "name": "Flip another tile vertically", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["piece 1"], + "outputs": ["bottom left"], + "command_spec": { + "command": ["convert", "-flip"], + "bottom left": { + "target": { + "type": "path", + "value": "/tmp/piece-1.png" + } + }, + "piece 1": { + "source": "piece 1" + } + } + } + ], + "piece 1": { + "type": "path", + "value": "/tmp/tile-2.png" + } + } + } + ], + "links": { + "1": [2], + "2": [3, 4] + }, + "metadata": {} +} diff --git a/exercises/inputs/3_files_and_commands/S/letter.png b/exercises/inputs/3_files_and_commands/S/letter.png new file mode 100644 index 0000000000000000000000000000000000000000..a627c918a5dcf985de6ba326b9bbbe3236d35701 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/S/letter.png differ diff --git a/exercises/inputs/3_files_and_commands/S/piece-1.png b/exercises/inputs/3_files_and_commands/S/piece-1.png new file mode 100644 index 0000000000000000000000000000000000000000..0225ce58dfcaa998d2bd3bf1446cc60a1ec19f6f Binary files /dev/null and b/exercises/inputs/3_files_and_commands/S/piece-1.png differ diff --git a/exercises/inputs/3_files_and_commands/S/piece-2.png b/exercises/inputs/3_files_and_commands/S/piece-2.png new file mode 100644 index 0000000000000000000000000000000000000000..a1f542d05e2ff5d8caa6f0d9d58a07889a645159 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/S/piece-2.png differ diff --git a/exercises/inputs/3_files_and_commands/S/tile-0.png b/exercises/inputs/3_files_and_commands/S/tile-0.png new file mode 100644 index 0000000000000000000000000000000000000000..cd669bcf009b41bbbc615b7c7aa59bc15926e67c Binary files /dev/null and b/exercises/inputs/3_files_and_commands/S/tile-0.png differ diff --git a/exercises/inputs/3_files_and_commands/S/tile-1.png b/exercises/inputs/3_files_and_commands/S/tile-1.png new file mode 100644 index 0000000000000000000000000000000000000000..f7644d9de8ec4a0c97ec8ee0f81fd08a219d659f Binary files /dev/null and b/exercises/inputs/3_files_and_commands/S/tile-1.png differ diff --git a/exercises/inputs/3_files_and_commands/S/tile-2.png b/exercises/inputs/3_files_and_commands/S/tile-2.png new file mode 100644 index 0000000000000000000000000000000000000000..aee03915bd55d47c252dbd4144d8a10af8baea18 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/S/tile-2.png differ diff --git a/exercises/inputs/3_files_and_commands/S/tile-3.png b/exercises/inputs/3_files_and_commands/S/tile-3.png new file mode 100644 index 0000000000000000000000000000000000000000..d4e295a64b6b380f25e21139a6086f8c25f8b885 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/S/tile-3.png differ diff --git a/exercises/inputs/3_files_and_commands/T/image_tiling.json b/exercises/inputs/3_files_and_commands/T/image_tiling.json new file mode 100644 index 0000000000000000000000000000000000000000..7b4b56cd4af912c20c2c462a0f2f4d189cb83394 --- /dev/null +++ b/exercises/inputs/3_files_and_commands/T/image_tiling.json @@ -0,0 +1,140 @@ +{ + "name": "Image tiling", + "fws": [ + { + "fw_id": 1, + "name": "Render an image from a character", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["character"], + "outputs": ["image"], + "command_spec": { + "command": [ + "convert", "-size", "800x800", + "-background", "white", + "-pointsize", "800", + "-fill", "blue", + "-gravity", "Center", + "-trim" + ], + "character": { + "binding": { + "prefix": "caption", + "separator": ":" + }, + "source": { + "type": "data", + "value": "T" + } + }, + "image": { + "target": { + "type": "path", + "value": "/tmp/letter.png" + } + } + } + } + ] + } + }, + { + "fw_id": 2, + "name": "Tile the image into four tiles", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["image", "tiled image"], + "command_spec": { + "command": [ + "convert", + "-crop", "2x2@" + ], + "image": { + "source": "image" + }, + "tiled image": { + "source": { + "type": "data", + "value": "/tmp/tile.png" + } + } + } + } + ] + } + }, + { + "fw_id": 3, + "name": "Rotate one tile 90 degrees clockwise", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["rotation angle", "piece 2"], + "outputs": ["top left"], + "command_spec": { + "command": ["convert", "-rotate"], + "rotation angle": { + "source": { + "type": "data", + "value": 90 + } + }, + "top left": { + "target": { + "type": "path", + "value": "/tmp/piece-2.png" + } + }, + "piece 2": { + "source": "piece 2" + } + } + } + ], + "piece 2": { + "type": "path", + "value": "/tmp/tile-0.png" + } + } + }, + { + "fw_id": 4, + "name": "Flip another tile vertically", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["piece 1"], + "outputs": ["bottom right"], + "command_spec": { + "command": ["convert", "-flip"], + "bottom right": { + "target": { + "type": "path", + "value": "/tmp/piece-1.png" + } + }, + "piece 1": { + "source": "piece 1" + } + } + } + ], + "piece 1": { + "type": "path", + "value": "/tmp/tile-3.png" + } + } + } + ], + "links": { + "1": [2], + "2": [3, 4] + }, + "metadata": {} +} diff --git a/exercises/inputs/3_files_and_commands/T/letter.png b/exercises/inputs/3_files_and_commands/T/letter.png new file mode 100644 index 0000000000000000000000000000000000000000..859c1532642afe3b10c2a0542cd786ab3bcd88ee Binary files /dev/null and b/exercises/inputs/3_files_and_commands/T/letter.png differ diff --git a/exercises/inputs/3_files_and_commands/T/piece-1.png b/exercises/inputs/3_files_and_commands/T/piece-1.png new file mode 100644 index 0000000000000000000000000000000000000000..32a28b4a77e245f8d5348f70c04f16d8c9fda8f3 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/T/piece-1.png differ diff --git a/exercises/inputs/3_files_and_commands/T/piece-2.png b/exercises/inputs/3_files_and_commands/T/piece-2.png new file mode 100644 index 0000000000000000000000000000000000000000..1521676eecbb29f9fdca2bfaf02b69e680e965c9 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/T/piece-2.png differ diff --git a/exercises/inputs/3_files_and_commands/T/tile-0.png b/exercises/inputs/3_files_and_commands/T/tile-0.png new file mode 100644 index 0000000000000000000000000000000000000000..fe5c927c6c01e513a02b77c42c9a681d187b894b Binary files /dev/null and b/exercises/inputs/3_files_and_commands/T/tile-0.png differ diff --git a/exercises/inputs/3_files_and_commands/T/tile-1.png b/exercises/inputs/3_files_and_commands/T/tile-1.png new file mode 100644 index 0000000000000000000000000000000000000000..c392beb66b17b1b898f0d26b64679ed82470413d Binary files /dev/null and b/exercises/inputs/3_files_and_commands/T/tile-1.png differ diff --git a/exercises/inputs/3_files_and_commands/T/tile-2.png b/exercises/inputs/3_files_and_commands/T/tile-2.png new file mode 100644 index 0000000000000000000000000000000000000000..a13c55edb174c060b9507e9d5c889c27eaed956c Binary files /dev/null and b/exercises/inputs/3_files_and_commands/T/tile-2.png differ diff --git a/exercises/inputs/3_files_and_commands/T/tile-3.png b/exercises/inputs/3_files_and_commands/T/tile-3.png new file mode 100644 index 0000000000000000000000000000000000000000..8c54531e00a3e49577dbfdc019ef7e46fec28a1f Binary files /dev/null and b/exercises/inputs/3_files_and_commands/T/tile-3.png differ diff --git a/exercises/inputs/3_files_and_commands/U/image_tiling.json b/exercises/inputs/3_files_and_commands/U/image_tiling.json new file mode 100644 index 0000000000000000000000000000000000000000..1140bd97332cd978ddbcb93025ea2d333018b48a --- /dev/null +++ b/exercises/inputs/3_files_and_commands/U/image_tiling.json @@ -0,0 +1,140 @@ +{ + "name": "Image tiling", + "fws": [ + { + "fw_id": 1, + "name": "Render an image from a character", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["character"], + "outputs": ["image"], + "command_spec": { + "command": [ + "convert", "-size", "800x800", + "-background", "white", + "-pointsize", "800", + "-fill", "blue", + "-gravity", "Center", + "-trim" + ], + "character": { + "binding": { + "prefix": "caption", + "separator": ":" + }, + "source": { + "type": "data", + "value": "U" + } + }, + "image": { + "target": { + "type": "path", + "value": "/tmp/letter.png" + } + } + } + } + ] + } + }, + { + "fw_id": 2, + "name": "Tile the image into four tiles", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["image", "tiled image"], + "command_spec": { + "command": [ + "convert", + "-crop", "2x2@" + ], + "image": { + "source": "image" + }, + "tiled image": { + "source": { + "type": "data", + "value": "/tmp/tile.png" + } + } + } + } + ] + } + }, + { + "fw_id": 3, + "name": "Rotate one tile 90 degrees clockwise", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["rotation angle", "piece 2"], + "outputs": ["top left"], + "command_spec": { + "command": ["convert", "-rotate"], + "rotation angle": { + "source": { + "type": "data", + "value": 90 + } + }, + "top left": { + "target": { + "type": "path", + "value": "/tmp/piece-2.png" + } + }, + "piece 2": { + "source": "piece 2" + } + } + } + ], + "piece 2": { + "type": "path", + "value": "/tmp/tile-0.png" + } + } + }, + { + "fw_id": 4, + "name": "Flip another tile vertically", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["piece 1"], + "outputs": ["bottom right"], + "command_spec": { + "command": ["convert", "-flip"], + "bottom right": { + "target": { + "type": "path", + "value": "/tmp/piece-1.png" + } + }, + "piece 1": { + "source": "piece 1" + } + } + } + ], + "piece 1": { + "type": "path", + "value": "/tmp/tile-3.png" + } + } + } + ], + "links": { + "1": [2], + "2": [3, 4] + }, + "metadata": {} +} diff --git a/exercises/inputs/3_files_and_commands/U/letter.png b/exercises/inputs/3_files_and_commands/U/letter.png new file mode 100644 index 0000000000000000000000000000000000000000..09a59610de427b9d41a40d8289c783c67ff61db2 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/U/letter.png differ diff --git a/exercises/inputs/3_files_and_commands/U/piece-1.png b/exercises/inputs/3_files_and_commands/U/piece-1.png new file mode 100644 index 0000000000000000000000000000000000000000..52e1b365816a85582180697a74befa8ad842bf52 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/U/piece-1.png differ diff --git a/exercises/inputs/3_files_and_commands/U/piece-2.png b/exercises/inputs/3_files_and_commands/U/piece-2.png new file mode 100644 index 0000000000000000000000000000000000000000..1a075fb1be153b0d951fa3d83d24a79ea0be65bd Binary files /dev/null and b/exercises/inputs/3_files_and_commands/U/piece-2.png differ diff --git a/exercises/inputs/3_files_and_commands/U/tile-0.png b/exercises/inputs/3_files_and_commands/U/tile-0.png new file mode 100644 index 0000000000000000000000000000000000000000..55c658dd8c0106e1f5118e3368fe45cf175d275c Binary files /dev/null and b/exercises/inputs/3_files_and_commands/U/tile-0.png differ diff --git a/exercises/inputs/3_files_and_commands/U/tile-1.png b/exercises/inputs/3_files_and_commands/U/tile-1.png new file mode 100644 index 0000000000000000000000000000000000000000..be4a188d40d368a30c6e1703615730101ca5ebe9 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/U/tile-1.png differ diff --git a/exercises/inputs/3_files_and_commands/U/tile-2.png b/exercises/inputs/3_files_and_commands/U/tile-2.png new file mode 100644 index 0000000000000000000000000000000000000000..85f86afaa6a6e0639717565e3ae3f716ba16ebd7 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/U/tile-2.png differ diff --git a/exercises/inputs/3_files_and_commands/U/tile-3.png b/exercises/inputs/3_files_and_commands/U/tile-3.png new file mode 100644 index 0000000000000000000000000000000000000000..9bc097610f239615673c50e57e14496c5fe6a825 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/U/tile-3.png differ diff --git a/exercises/inputs/3_files_and_commands/V/image_tiling.json b/exercises/inputs/3_files_and_commands/V/image_tiling.json new file mode 100644 index 0000000000000000000000000000000000000000..8b9091c8e045be5d8cb21a450e388327b0e362f2 --- /dev/null +++ b/exercises/inputs/3_files_and_commands/V/image_tiling.json @@ -0,0 +1,140 @@ +{ + "name": "Image tiling", + "fws": [ + { + "fw_id": 1, + "name": "Render an image from a character", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["character"], + "outputs": ["image"], + "command_spec": { + "command": [ + "convert", "-size", "800x800", + "-background", "white", + "-pointsize", "800", + "-fill", "blue", + "-gravity", "Center", + "-trim" + ], + "character": { + "binding": { + "prefix": "caption", + "separator": ":" + }, + "source": { + "type": "data", + "value": "V" + } + }, + "image": { + "target": { + "type": "path", + "value": "/tmp/letter.png" + } + } + } + } + ] + } + }, + { + "fw_id": 2, + "name": "Tile the image into four tiles", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["image", "tiled image"], + "command_spec": { + "command": [ + "convert", + "-crop", "2x2@" + ], + "image": { + "source": "image" + }, + "tiled image": { + "source": { + "type": "data", + "value": "/tmp/tile.png" + } + } + } + } + ] + } + }, + { + "fw_id": 3, + "name": "Rotate one tile 90 degrees clockwise", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["rotation angle", "piece 2"], + "outputs": ["top left"], + "command_spec": { + "command": ["convert", "-rotate"], + "rotation angle": { + "source": { + "type": "data", + "value": 90 + } + }, + "top left": { + "target": { + "type": "path", + "value": "/tmp/piece-2.png" + } + }, + "piece 2": { + "source": "piece 2" + } + } + } + ], + "piece 2": { + "type": "path", + "value": "/tmp/tile-0.png" + } + } + }, + { + "fw_id": 4, + "name": "Flip another tile vertically", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["piece 1"], + "outputs": ["bottom right"], + "command_spec": { + "command": ["convert", "-flip"], + "bottom right": { + "target": { + "type": "path", + "value": "/tmp/piece-1.png" + } + }, + "piece 1": { + "source": "piece 1" + } + } + } + ], + "piece 1": { + "type": "path", + "value": "/tmp/tile-3.png" + } + } + } + ], + "links": { + "1": [2], + "2": [3, 4] + }, + "metadata": {} +} diff --git a/exercises/inputs/3_files_and_commands/V/letter.png b/exercises/inputs/3_files_and_commands/V/letter.png new file mode 100644 index 0000000000000000000000000000000000000000..846c9c1bbeaca300754f518057a92c029464ed97 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/V/letter.png differ diff --git a/exercises/inputs/3_files_and_commands/V/piece-1.png b/exercises/inputs/3_files_and_commands/V/piece-1.png new file mode 100644 index 0000000000000000000000000000000000000000..1176756124952b6e46e8167122488dd17cabe376 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/V/piece-1.png differ diff --git a/exercises/inputs/3_files_and_commands/V/piece-2.png b/exercises/inputs/3_files_and_commands/V/piece-2.png new file mode 100644 index 0000000000000000000000000000000000000000..2aaf322df12d1c80ec2f14c0da222b9656c33ca4 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/V/piece-2.png differ diff --git a/exercises/inputs/3_files_and_commands/V/tile-0.png b/exercises/inputs/3_files_and_commands/V/tile-0.png new file mode 100644 index 0000000000000000000000000000000000000000..7fb3529c39ff361080b8d6b673648345c2c1c1ad Binary files /dev/null and b/exercises/inputs/3_files_and_commands/V/tile-0.png differ diff --git a/exercises/inputs/3_files_and_commands/V/tile-1.png b/exercises/inputs/3_files_and_commands/V/tile-1.png new file mode 100644 index 0000000000000000000000000000000000000000..9f810e219c46fd5f0809fb7f7d773ec802090e10 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/V/tile-1.png differ diff --git a/exercises/inputs/3_files_and_commands/V/tile-2.png b/exercises/inputs/3_files_and_commands/V/tile-2.png new file mode 100644 index 0000000000000000000000000000000000000000..f25c631a88f4adf79a6e1b08fba743722e8b5832 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/V/tile-2.png differ diff --git a/exercises/inputs/3_files_and_commands/V/tile-3.png b/exercises/inputs/3_files_and_commands/V/tile-3.png new file mode 100644 index 0000000000000000000000000000000000000000..fb5b83828bfb4d3d0677a4cf047ad8b99c3f2ddf Binary files /dev/null and b/exercises/inputs/3_files_and_commands/V/tile-3.png differ diff --git a/exercises/inputs/3_files_and_commands/W/image_tiling.json b/exercises/inputs/3_files_and_commands/W/image_tiling.json new file mode 100644 index 0000000000000000000000000000000000000000..9057391440b305c9272b1482bda2dd81feee27a8 --- /dev/null +++ b/exercises/inputs/3_files_and_commands/W/image_tiling.json @@ -0,0 +1,140 @@ +{ + "name": "Image tiling", + "fws": [ + { + "fw_id": 1, + "name": "Render an image from a character", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["character"], + "outputs": ["image"], + "command_spec": { + "command": [ + "convert", "-size", "800x800", + "-background", "white", + "-pointsize", "800", + "-fill", "blue", + "-gravity", "Center", + "-trim" + ], + "character": { + "binding": { + "prefix": "caption", + "separator": ":" + }, + "source": { + "type": "data", + "value": "W" + } + }, + "image": { + "target": { + "type": "path", + "value": "/tmp/letter.png" + } + } + } + } + ] + } + }, + { + "fw_id": 2, + "name": "Tile the image into four tiles", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["image", "tiled image"], + "command_spec": { + "command": [ + "convert", + "-crop", "2x2@" + ], + "image": { + "source": "image" + }, + "tiled image": { + "source": { + "type": "data", + "value": "/tmp/tile.png" + } + } + } + } + ] + } + }, + { + "fw_id": 3, + "name": "Rotate one tile 90 degrees clockwise", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["rotation angle", "piece 2"], + "outputs": ["top left"], + "command_spec": { + "command": ["convert", "-rotate"], + "rotation angle": { + "source": { + "type": "data", + "value": 90 + } + }, + "top left": { + "target": { + "type": "path", + "value": "/tmp/piece-2.png" + } + }, + "piece 2": { + "source": "piece 2" + } + } + } + ], + "piece 2": { + "type": "path", + "value": "/tmp/tile-0.png" + } + } + }, + { + "fw_id": 4, + "name": "Flip another tile vertically", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["piece 1"], + "outputs": ["bottom right"], + "command_spec": { + "command": ["convert", "-flip"], + "bottom right": { + "target": { + "type": "path", + "value": "/tmp/piece-1.png" + } + }, + "piece 1": { + "source": "piece 1" + } + } + } + ], + "piece 1": { + "type": "path", + "value": "/tmp/tile-3.png" + } + } + } + ], + "links": { + "1": [2], + "2": [3, 4] + }, + "metadata": {} +} diff --git a/exercises/inputs/3_files_and_commands/W/letter.png b/exercises/inputs/3_files_and_commands/W/letter.png new file mode 100644 index 0000000000000000000000000000000000000000..439e4662ece5de79540746607c150a37bd0ca570 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/W/letter.png differ diff --git a/exercises/inputs/3_files_and_commands/W/piece-1.png b/exercises/inputs/3_files_and_commands/W/piece-1.png new file mode 100644 index 0000000000000000000000000000000000000000..0d8694a292b1e620eca467c174830cdde8d24a7c Binary files /dev/null and b/exercises/inputs/3_files_and_commands/W/piece-1.png differ diff --git a/exercises/inputs/3_files_and_commands/W/piece-2.png b/exercises/inputs/3_files_and_commands/W/piece-2.png new file mode 100644 index 0000000000000000000000000000000000000000..83d505de4916f1a6be61c1190167fc67fdcc4cca Binary files /dev/null and b/exercises/inputs/3_files_and_commands/W/piece-2.png differ diff --git a/exercises/inputs/3_files_and_commands/W/tile-0.png b/exercises/inputs/3_files_and_commands/W/tile-0.png new file mode 100644 index 0000000000000000000000000000000000000000..13290c0aeb424c17770d1711bd338345f72e9a8f Binary files /dev/null and b/exercises/inputs/3_files_and_commands/W/tile-0.png differ diff --git a/exercises/inputs/3_files_and_commands/W/tile-1.png b/exercises/inputs/3_files_and_commands/W/tile-1.png new file mode 100644 index 0000000000000000000000000000000000000000..f799085b7b738f20c3534114e19c5f79dc3ce60f Binary files /dev/null and b/exercises/inputs/3_files_and_commands/W/tile-1.png differ diff --git a/exercises/inputs/3_files_and_commands/W/tile-2.png b/exercises/inputs/3_files_and_commands/W/tile-2.png new file mode 100644 index 0000000000000000000000000000000000000000..7d22e8c204136220ff57850aae608cde22cc5adb Binary files /dev/null and b/exercises/inputs/3_files_and_commands/W/tile-2.png differ diff --git a/exercises/inputs/3_files_and_commands/W/tile-3.png b/exercises/inputs/3_files_and_commands/W/tile-3.png new file mode 100644 index 0000000000000000000000000000000000000000..b5fed5f76ea75d8a7855aee4880c26630f2b4be5 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/W/tile-3.png differ diff --git a/exercises/inputs/3_files_and_commands/X/image_tiling.json b/exercises/inputs/3_files_and_commands/X/image_tiling.json new file mode 100644 index 0000000000000000000000000000000000000000..c6d9d6c06a0657ce14886dd4e4767972161c62f2 --- /dev/null +++ b/exercises/inputs/3_files_and_commands/X/image_tiling.json @@ -0,0 +1,111 @@ +{ + "name": "Image tiling", + "fws": [ + { + "fw_id": 1, + "name": "Render an image from a character", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["character"], + "outputs": ["image"], + "command_spec": { + "command": [ + "convert", "-size", "800x800", + "-background", "white", + "-pointsize", "800", + "-fill", "blue", + "-gravity", "Center", + "-trim" + ], + "character": { + "binding": { + "prefix": "caption", + "separator": ":" + }, + "source": { + "type": "data", + "value": "X" + } + }, + "image": { + "target": { + "type": "path", + "value": "/tmp/letter.png" + } + } + } + } + ] + } + }, + { + "fw_id": 2, + "name": "Tile the image into four tiles", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["image", "tiled image"], + "command_spec": { + "command": [ + "convert", + "-crop", "2x2@" + ], + "image": { + "source": "image" + }, + "tiled image": { + "source": { + "type": "data", + "value": "/tmp/tile.png" + } + } + } + } + ] + } + }, + { + "fw_id": 3, + "name": "Rotate one tile 90 degrees clockwise", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["rotation angle", "piece 1"], + "outputs": ["top left"], + "command_spec": { + "command": ["convert", "-rotate"], + "rotation angle": { + "source": { + "type": "data", + "value": 90 + } + }, + "top left": { + "target": { + "type": "path", + "value": "/tmp/piece-1.png" + } + }, + "piece 1": { + "source": "piece 1" + } + } + } + ], + "piece 1": { + "type": "path", + "value": "/tmp/tile-0.png" + } + } + } + ], + "links": { + "1": [2], + "2": [3] + }, + "metadata": {} +} diff --git a/exercises/inputs/3_files_and_commands/X/letter.png b/exercises/inputs/3_files_and_commands/X/letter.png new file mode 100644 index 0000000000000000000000000000000000000000..f867045ba941ac8b26a098d9a0f45922d3604cfc Binary files /dev/null and b/exercises/inputs/3_files_and_commands/X/letter.png differ diff --git a/exercises/inputs/3_files_and_commands/X/piece-1.png b/exercises/inputs/3_files_and_commands/X/piece-1.png new file mode 100644 index 0000000000000000000000000000000000000000..e3b5ca8d527730885028950cfdbb4ad6e4efda9d Binary files /dev/null and b/exercises/inputs/3_files_and_commands/X/piece-1.png differ diff --git a/exercises/inputs/3_files_and_commands/X/tile-0.png b/exercises/inputs/3_files_and_commands/X/tile-0.png new file mode 100644 index 0000000000000000000000000000000000000000..398445bfefaeafbdbdd80846f8b61210518d398f Binary files /dev/null and b/exercises/inputs/3_files_and_commands/X/tile-0.png differ diff --git a/exercises/inputs/3_files_and_commands/X/tile-1.png b/exercises/inputs/3_files_and_commands/X/tile-1.png new file mode 100644 index 0000000000000000000000000000000000000000..c1b8505090757ed6037443f22d8af70ff2a2f572 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/X/tile-1.png differ diff --git a/exercises/inputs/3_files_and_commands/X/tile-2.png b/exercises/inputs/3_files_and_commands/X/tile-2.png new file mode 100644 index 0000000000000000000000000000000000000000..2f10a5dc5e33906442dd9e602f9c6c3ea4882133 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/X/tile-2.png differ diff --git a/exercises/inputs/3_files_and_commands/X/tile-3.png b/exercises/inputs/3_files_and_commands/X/tile-3.png new file mode 100644 index 0000000000000000000000000000000000000000..7e37d3e18e9d1f042cfaa6cf28af03979be7d9e8 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/X/tile-3.png differ diff --git a/exercises/inputs/3_files_and_commands/Y/image_tiling.json b/exercises/inputs/3_files_and_commands/Y/image_tiling.json new file mode 100644 index 0000000000000000000000000000000000000000..6c7fcdfc3fa8373c6f0de0e2efa12d6570e5bbf6 --- /dev/null +++ b/exercises/inputs/3_files_and_commands/Y/image_tiling.json @@ -0,0 +1,140 @@ +{ + "name": "Image tiling", + "fws": [ + { + "fw_id": 1, + "name": "Render an image from a character", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["character"], + "outputs": ["image"], + "command_spec": { + "command": [ + "convert", "-size", "800x800", + "-background", "white", + "-pointsize", "800", + "-fill", "blue", + "-gravity", "Center", + "-trim" + ], + "character": { + "binding": { + "prefix": "caption", + "separator": ":" + }, + "source": { + "type": "data", + "value": "Y" + } + }, + "image": { + "target": { + "type": "path", + "value": "/tmp/letter.png" + } + } + } + } + ] + } + }, + { + "fw_id": 2, + "name": "Tile the image into four tiles", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["image", "tiled image"], + "command_spec": { + "command": [ + "convert", + "-crop", "2x2@" + ], + "image": { + "source": "image" + }, + "tiled image": { + "source": { + "type": "data", + "value": "/tmp/tile.png" + } + } + } + } + ] + } + }, + { + "fw_id": 3, + "name": "Rotate one tile 90 degrees clockwise", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["rotation angle", "piece 2"], + "outputs": ["top left"], + "command_spec": { + "command": ["convert", "-rotate"], + "rotation angle": { + "source": { + "type": "data", + "value": 90 + } + }, + "top left": { + "target": { + "type": "path", + "value": "/tmp/piece-2.png" + } + }, + "piece 2": { + "source": "piece 2" + } + } + } + ], + "piece 2": { + "type": "path", + "value": "/tmp/tile-0.png" + } + } + }, + { + "fw_id": 4, + "name": "Flip another tile vertically", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["piece 1"], + "outputs": ["bottom right"], + "command_spec": { + "command": ["convert", "-flip"], + "bottom right": { + "target": { + "type": "path", + "value": "/tmp/piece-1.png" + } + }, + "piece 1": { + "source": "piece 1" + } + } + } + ], + "piece 1": { + "type": "path", + "value": "/tmp/tile-3.png" + } + } + } + ], + "links": { + "1": [2], + "2": [3, 4] + }, + "metadata": {} +} diff --git a/exercises/inputs/3_files_and_commands/Y/letter.png b/exercises/inputs/3_files_and_commands/Y/letter.png new file mode 100644 index 0000000000000000000000000000000000000000..32cec4d803391307230c024eb59d1effa4d367e9 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/Y/letter.png differ diff --git a/exercises/inputs/3_files_and_commands/Y/piece-1.png b/exercises/inputs/3_files_and_commands/Y/piece-1.png new file mode 100644 index 0000000000000000000000000000000000000000..e6b7316888f403f4648c54c7187dc60ab6974e37 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/Y/piece-1.png differ diff --git a/exercises/inputs/3_files_and_commands/Y/piece-2.png b/exercises/inputs/3_files_and_commands/Y/piece-2.png new file mode 100644 index 0000000000000000000000000000000000000000..02f862d8251cd6e3f28a40d6a08f8bff6c00c47d Binary files /dev/null and b/exercises/inputs/3_files_and_commands/Y/piece-2.png differ diff --git a/exercises/inputs/3_files_and_commands/Y/tile-0.png b/exercises/inputs/3_files_and_commands/Y/tile-0.png new file mode 100644 index 0000000000000000000000000000000000000000..260e0a8e975987ae0e86d65631262bcb58d082eb Binary files /dev/null and b/exercises/inputs/3_files_and_commands/Y/tile-0.png differ diff --git a/exercises/inputs/3_files_and_commands/Y/tile-1.png b/exercises/inputs/3_files_and_commands/Y/tile-1.png new file mode 100644 index 0000000000000000000000000000000000000000..6ec5a10e4fb0a05bea6bbf00cdfb127be983b9b4 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/Y/tile-1.png differ diff --git a/exercises/inputs/3_files_and_commands/Y/tile-2.png b/exercises/inputs/3_files_and_commands/Y/tile-2.png new file mode 100644 index 0000000000000000000000000000000000000000..540b874c2d30214d006def52af11ad63d40b19e2 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/Y/tile-2.png differ diff --git a/exercises/inputs/3_files_and_commands/Y/tile-3.png b/exercises/inputs/3_files_and_commands/Y/tile-3.png new file mode 100644 index 0000000000000000000000000000000000000000..f70ac8f58f8b8c3c1a12dc638f1459f4dbc995cd Binary files /dev/null and b/exercises/inputs/3_files_and_commands/Y/tile-3.png differ diff --git a/exercises/inputs/3_files_and_commands/Z/image_tiling.json b/exercises/inputs/3_files_and_commands/Z/image_tiling.json new file mode 100644 index 0000000000000000000000000000000000000000..83619aaa88cf9ac7f08a18e42cbcaee96d749104 --- /dev/null +++ b/exercises/inputs/3_files_and_commands/Z/image_tiling.json @@ -0,0 +1,140 @@ +{ + "name": "Image tiling", + "fws": [ + { + "fw_id": 1, + "name": "Render an image from a character", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["character"], + "outputs": ["image"], + "command_spec": { + "command": [ + "convert", "-size", "800x800", + "-background", "white", + "-pointsize", "800", + "-fill", "blue", + "-gravity", "Center", + "-trim" + ], + "character": { + "binding": { + "prefix": "caption", + "separator": ":" + }, + "source": { + "type": "data", + "value": "Z" + } + }, + "image": { + "target": { + "type": "path", + "value": "/tmp/letter.png" + } + } + } + } + ] + } + }, + { + "fw_id": 2, + "name": "Tile the image into four tiles", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["image", "tiled image"], + "command_spec": { + "command": [ + "convert", + "-crop", "2x2@" + ], + "image": { + "source": "image" + }, + "tiled image": { + "source": { + "type": "data", + "value": "/tmp/tile.png" + } + } + } + } + ] + } + }, + { + "fw_id": 3, + "name": "Rotate one tile 90 degrees clockwise", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["rotation angle", "piece 2"], + "outputs": ["top left"], + "command_spec": { + "command": ["convert", "-rotate"], + "rotation angle": { + "source": { + "type": "data", + "value": 90 + } + }, + "top left": { + "target": { + "type": "path", + "value": "/tmp/piece-2.png" + } + }, + "piece 2": { + "source": "piece 2" + } + } + } + ], + "piece 2": { + "type": "path", + "value": "/tmp/tile-0.png" + } + } + }, + { + "fw_id": 4, + "name": "Flip another tile vertically", + "spec": { + "_tasks": [ + { + "_fw_name": "CommandLineTask", + "inputs": ["piece 1"], + "outputs": ["bottom left"], + "command_spec": { + "command": ["convert", "-flip"], + "bottom left": { + "target": { + "type": "path", + "value": "/tmp/piece-1.png" + } + }, + "piece 1": { + "source": "piece 1" + } + } + } + ], + "piece 1": { + "type": "path", + "value": "/tmp/tile-2.png" + } + } + } + ], + "links": { + "1": [2], + "2": [3, 4] + }, + "metadata": {} +} diff --git a/exercises/inputs/3_files_and_commands/Z/letter.png b/exercises/inputs/3_files_and_commands/Z/letter.png new file mode 100644 index 0000000000000000000000000000000000000000..7fd66c8f17df7d7da7aa2ac29b60bcaf22ad26d9 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/Z/letter.png differ diff --git a/exercises/inputs/3_files_and_commands/Z/piece-1.png b/exercises/inputs/3_files_and_commands/Z/piece-1.png new file mode 100644 index 0000000000000000000000000000000000000000..1117efc307d00cd03cb46037c7ba4dbb5411c4c8 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/Z/piece-1.png differ diff --git a/exercises/inputs/3_files_and_commands/Z/piece-2.png b/exercises/inputs/3_files_and_commands/Z/piece-2.png new file mode 100644 index 0000000000000000000000000000000000000000..4054ecbd9da588c7558e5e6ed827d0b3438b1046 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/Z/piece-2.png differ diff --git a/exercises/inputs/3_files_and_commands/Z/tile-0.png b/exercises/inputs/3_files_and_commands/Z/tile-0.png new file mode 100644 index 0000000000000000000000000000000000000000..050e08f8a07012f655755c96031a8cb25753139f Binary files /dev/null and b/exercises/inputs/3_files_and_commands/Z/tile-0.png differ diff --git a/exercises/inputs/3_files_and_commands/Z/tile-1.png b/exercises/inputs/3_files_and_commands/Z/tile-1.png new file mode 100644 index 0000000000000000000000000000000000000000..f3eb2c620fbf08bc5fb6ef123aa8d4fe9d153ab8 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/Z/tile-1.png differ diff --git a/exercises/inputs/3_files_and_commands/Z/tile-2.png b/exercises/inputs/3_files_and_commands/Z/tile-2.png new file mode 100644 index 0000000000000000000000000000000000000000..9835356c38c2318a05a322d030c02ab1b0f78935 Binary files /dev/null and b/exercises/inputs/3_files_and_commands/Z/tile-2.png differ diff --git a/exercises/inputs/3_files_and_commands/Z/tile-3.png b/exercises/inputs/3_files_and_commands/Z/tile-3.png new file mode 100644 index 0000000000000000000000000000000000000000..a21d6f61b2d12517c0d1cf0b92a4c5b1f775776b Binary files /dev/null and b/exercises/inputs/3_files_and_commands/Z/tile-3.png differ