#!/bin/bash

mkdir data
sort names.txt | uniq | while read name; do
    file="$(echo "$name" | sed s@/@_slash_@g)"
    curl -s --compressed -F catname="" -F pages="$name" "http://wiki.openmoko.org/index.php?title=Special:Export&action=submit" > "data/$file.xml"
    ls -l "data/$file.xml"
    sleep 0.5
done
