Ruby Scripts

These are little programs I wrote to make textile hobby tasks easier!

Ruby is a programming language

Gradient Maker

Create a pattern which blends from colour A to colour B - for knitting patterns, cross stitch patterns, any craft which uses a grid.

INPUT: Type in the number of stitches in a row; the number of rows for the gradient section; and a name for the finished file

OUTPUT: a .csv file, which can be opened in Excel or any other spreadsheet program, containing a picture of your gradient.

Gradients can be any size, and you can then edit the pattern with row numbers, colours, or any other details.

That image uses Conditional Formatting, to colour the two squares automatically:

  1. highlight and copy the white square symbol
  2. highlight whole document
  3. go to Conditional Formatting
  4. paste white square, and choose a colour
  5. document will now show colours graphically
  6. repeat with black square symbol
  7. save file as a different format (NOT a .csv) to save formatting
  8. You can also set Column Height and Row Height so that each spreadsheet cell looks like a square

CAVEAT CODER: I haven't improved this program so it - say - will notice if you type in incorrect numbers or a file name that's already in use.

What is Ruby?

Ruby is a programming language. It is elegant and easy to read, and allows you to make quite hacky programs where you sketch as you go along instead of having to plan everything out in advance. I am not very good at it, but I'm alright at chucking together little utility programs which interact with text or spreadsheets.

To run these programs, you must first download and install Ruby

Go Home