eydy

A script to download tracks from Everyday Looper iPhone app.  This a really beautiful, awesome app I use a lot. 

Its weakness is transfering audio files to a computer-- the browser interface takes a lot of clicks.  This script fetches all of them.

Download: eydy.pl

----------------------------------------------------------

USAGE:

perl eydy.pl <directory> <ip=10.0.1.7:8080>

Download all audio tracks to specified directory. 
The app shows its IP address in 'Tools' when the HTTP server is on; supply if different from the script's default. 

----------------------------------------------------------
#!/usr/bin/perl -w

my $ip0 = "10.0.1.7:8080"; #default

if(!@ARGV) {
  print <<"HERE";
eydy.pl: downloads tracks from EverydayLooper ios app, via http.

Usage:

perl eydy.pl <directory> <ip=$ip0>
HERE
  exit;
}

my ($out,$ip) = (@ARGV,$ip0);
!(-d "$out") and (mkdir("$out") or die $!);

my ($http,$idx) = ("http://$ip","$out/index.html");
system "curl -s $http > \"$idx\""; #copy index.html; mine audio names:

open FH,$idx or die $!;
while(<FH>) {
  m|href=\"(SavedLoops/(.+)/Track_([1234].wav))| or next;
  !(-d "$out/$2") and (mkdir "$out/$2" or die $!);
  print STDERR "EyDy -> $out/$2/$3\n";
  system "curl -s $http/$1 -o \"$out/$2/$3\"";
}
close FH;
exit;