#!/usr/bin/perl # 2008-07-08 Bryan Bishop kanzure@gmail.com # Extract information from the humancortex XML files for specimen ID numbers. open(DOOR, ">>specimen_list.txt") or die $!; for ($i = 1; $i <= 190; $i++) { print "Iterating to file $i.xml.\n"; open(FILE, ") { if($line =~ /\(\d+)/) { print DOOR "$1\n"; print "XML fetch. Initializing wget fetch sequence on specimen with ID number $1\n"; `wget -nc http://humancortex.alleninstitute.org/has/human/specimen/summary/$1.xml `; print "\nJPEG fetch on human cortex specimen $1.\n"; `wget -nc http://humancortex.alleninstitute.org/ImageWeb/GetImage?imageId=$1&zoom=3&size=max`; print "Successfully fetched human cortex specimen (from $i) $1.\n"; } } print "Closing file $i.\n"; close(FILE); #print "\n\nDone.\n\n"; } close(DOOR);