If you came across knitwork as a knitter who's never coded before (or maybe you're new to both, in which case you should also check out the about knitting page), writing code in knitout, the lab's machine-independent file format, might sound intimidating. But fear not! Knitout was designed to be low-level and intuitive, so you'll be writing your first lines of code in no time. Another key feature of knitout is that it is very extensible, so there are a lot of helper programs and extras to enhance your workflow. But before you dive into those, knitting a rectangle is a good place to start.
To get started, all you need is a bit of knitout-knowledge and a
Most of the lab's knitout-related programs depend on some additional resources, all of which are quite common in the coding world. The main external resources you'll come across in the knitout workflow are Git, and node.
All of the knitout-related programs listed below are available on GitHub, which a site for storing, managing, and sharing software and source code online, used in conjunction with Git.
Git is a version-control system used to manage file-based projects. What is meant by 'version-control' is that, each time you 'commit' (or save changes) your project, Git stores a reference to the state of the data, allowing for detailed version comparisons and recovery of a particular instance. Git is a powerful system that contains an abudance of tools, but we'll just go over the features most relevant to using knitout, and you can reference the official Git documentation for more details. In the context of the knitout workflow, you'll primarily being using Git as a command-line utility used to 'clone' (or copy) repositories from GitHub to your local computer. Before doing so, you'll need to install Git from its downloads page. To ensure that Git was installed properly, type the following in your command line:
git --version. If your met with
git version and not
git: command not found, you're all set!
To clone any of the lab's repositories, navigate to the GitHub repository page in your browser, click the green 'Code' button, and copy either the HTTPS web URL or the SSH Key (see the GitHub documentation on cloning with HTTPS and SSH URLS for assistance, and the page about connecting to GitHub with SSH if you want to generate an SSH key). Then, open up a terminal, a type the following command:
git clone (e.g.
git clone https://github.com/textiles-lab/knitout-live-visualizer.git).
npm i knitout, or by cloning the repository on GitHub.