Line 1: this code will bring in the Squib library for us to use. Keep this at the top.

Line 2: By convention, we put a blank line between our require statements and the rest of our code

Line 3: Define a new deck of cards. Just 2 cards. 825 pixels wide etc. Squib also supports Unit Conversion if you prefer to specify something like '2.75in'.

Line 4: Set the background to pink. Colors can be in various notations, and supports linear and radial graidents - see Specifying Colors & Gradients.

Line 5: Draw a rectangle around the edge of each card. Note that this has no arguments, because Parameters are Optional. The defaults can be found in the DSL reference for the rect method.

Line 6: Put some text in upper-left the corner of the card, using the default font, etc. See the text DSL method for more options. The first card will have 'Hello' and the second card will have 'World' because Squib Thinks in Arrays.

Line 7: Save our card out to a png files called hello_00.png and hello_01.png saved in the _output folder.

Line 3: Make 4 cards. Use two layouts: the built-in hand.yml (see Layouts are Squib’s Best Feature) and then our own layout. The layouts get merged, with our own even-bigger.yml overriding hand.yml whenever they collide.

Line 5: Read some data from an Excel file, which amounts to a column-based hash of arrays, so that each element of an array corresponds to a specific data point to a given card. For example, 3 in the 'Attack' column will be put on the second card.

Line 6: Using the Excel data cell for the filename, we can customize a different icon for every card. But, every SVG in this command will be styled according to the Art entry in our layout (i.e. in even-bigger.yml)

Line 8: Iterate over an array of strings, namely, 'Title', 'Description', and 'Snark'.

Line 9: Draw text for the (Title, Description, or Snark), using their styling rules in our layout.

Line 13: Using Ruby String interpolation, lookup the appropriate icon (e.g. 'attack.svg'), converted to lowercase letters, and then using the Icon layout of that for styling (e.g. 'AttackIcon' or 'DefendIcon')

Line 17: Render every card to individual PNG files

Line 18: Render a “showcase” of cards, using a perspective-reflect effect. See showcase method.

Line 19: Render a “hand” of cards (spread over a circle). See hand method.