Sewing pattern archive for all you textile geeks

From Indie Craft Gossip I heard about a huge pattern archive with pictures and data on sewing patterns from the U.S. dating back to 1860. There aren’t any instructions for sewing, but the pictures and the pattern designs themselves are amazingly cool and funny. I don’t even sew, and it was fun to browse their pages on the “guest access” password. Check out these matching dresses with oven mitts from a 1943 Simplicity pattern:

Matching oven mitts!

The search interface is a little annoying to use, but if you take a look at a pattern or two, you might notice that the urls are all the same and end in a pattern ID number. In fact, each picture on the pattern pages is named after that pattern id. If you would like to use them for private research or study purposes or personal use, that seems to be permitted.

In fact you can do that really handily by making a short shell script,

#!/bin/bash
for n in {1..100}
do
wget -r -l1 -np http://guest:pattern@www.uri.edu/library/special_collections/COPA/garment.php?patID=$n
wait 3
done

This would get you the first 100 patterns and you can search through their metadata on your hard drive with grep instead of using the clunky search boxes on the web site. I would recommend you not get too many at a time because it might be rude to their server, but find a range that you think are interesting, or copy the pattern ID numbers from a particular search. So if you wanted to fetch only patternIDs 14287, 10001, and 20, your script would look like this:

#!/bin/bash
for n in 14287 10001 20
do
wget -r -l1 -np http://guest:pattern@www.uri.edu/library/special_collections/COPA/garment.php?patID=$n
wait 3
done

This is assuming you’re using Linux or on a Mac with Xcode or where you have installed wget.

That wasn’t at all obvious to me at first and I messed around for 2 hours tonight trying to figure out how to do this. First I tried using curl because you can put a range of numbers in brackets to download sequential urls like this:

curl http://guest:pattern@www.uri.edu/library/special_collections/COPA/garment.php?patID=%5B1-10%5D -o pattern-id-1#.html

But that doesn’t get the images, which is no fun.
wget alone can get the images but only from a single url:

wget -r -l1 -np http://guest:pattern@www.uri.edu/library/special_collections/COPA/garment.php?patID=10

I tried writing some perl but wget is very annoying when you try to do a system call with it in Perl. Let’s not even go there. Meanwhile there was some really dorky googling of things like “files sequential variable mirror wget”… and “bad port number perl wget system call”.

Then I tried this script called curlmirror which almost worked.

Suddenly I stopped messing with it and wrote a 4 line shell script instead, feeling a little sheepish.

So, if you had set out to do this would you have realized how to do it quickly? Or do you have a better or different way to do it? On a meta level, have you messed around like this in several dead ends and do you find that to be stressful, normal, or downright fun? (I found it a mixture of all three; stressful because it feels like I “should” see the way to make it work, or the best way, immediately. It’s fun because I enjoy dabbling in all these possible methods and learning something.) Would you explain that you did non-working things for 2 hours first or do you think it’s better to just come out with the solution and not say how you arrived there?

6 thoughts on “Sewing pattern archive for all you textile geeks

  1. Skud

    Now I want matching oven mitts, dammit!

    I once did something very similar to what you did, only with maps. There was a site that had a historical map that I wanted for research for some fiction I was writing, and they had it in high resolution, but you could only see one little segment at a time in high res. Luckily they were sequentially numbered JPGs, so I did pretty much exactly the same as you did there. I pasted them all together with GIMP, which took me a couple of hours; I probably could have done it programatically somehow but I figured it would take as long to figure out as to do by hand.

    The resulting image file was freaking enormous. I burnt it onto a CD and took it to a print shop where I got them to print it on their plan printer. It came out about 1m high and 3m long, and cost around $20 or $25. I had it on my wall for ages, all covered with little sticky notes on which of my characters lived where, locations for various scenes of the story, etc.

  2. Thorfi

    This particular problem, I’d head straight for a Perl script and careful system calls to wget… But only because I’ve done a lot of experimenting in that space and already worked out how to use system without getting caught in the large myriad of pitfalls.

    I think the process is as critical as the final result – I’ve lost count of the number of times I’ve approached some programming problem a particular way, only to wind up throwing out hundreds and thousands of lines of code later when I realised there is a module that does that, or whatever.

    I don’t feel like that deleted work was wasted, usually I’ve learned something about the problem space, and usually I wind up using technique fragments at a later time when they turn out to be appropriate.

    It can be a little frustrating at the time, though, yes. :-)

    If I’m presenting or talking about it, then the “wrong” approaches and why they turned out wrong are often of more use and interest to the audience than simply presenting the “correct” end result.

  3. Rachel Holmen

    What a great link! I have a huge collection of patterns, even some of the ones my mother used for making my clothes when I was like, 6. (That was a LONG time ago.) And I buy ones from the 30s and 40s and 50s when I find them. I have a friend at work with a perfect 40s figure; now I just need to locate the fabulous camp-shirt and shorts pattern I know I have, that would look terrific on her. — Rachel Holmen

Comments are closed.