print_album.pl untested

filter: Statementstmt 0.0% 0 / 15 Branchbran n/a Subroutinesub 0.0% 0 / 1 Podpod n/a totaltotal 0.0% 0 / 16 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
CRAP 2.0
1 #!/usr/bin/perl
2 #
3 # Example program. Demonstrates usage of Mac::iPhoto.pm module.
4 #
5 use Mac::iPhoto;
6  
7 my $a = new Mac::iPhoto("./AlbumData.xml");
8  
9 $a->parse;
10  
11 printf "Created by iTunes v. %s / maj.%s / min.%s\n",
12 $a->{'Properties'}->{'Application Version'},
13 $a->{Properties}->{'Major Version'},
14 $a->{Properties}->{'Minor Version'};
15  
16 printf "Album path: %s\n", $a->{Properties}->{'Archive Path'};
17  
18 for my $album (@{$a->{Data}->{Albums}}) {
19  
20 printf "Name: %s \n", $album->{'AlbumName'};
21 printf "BookDesignName: %s \n", $album->{'BookDesignName'};
22 for my $key ( @{$album->{'KeyList'}}) {
23 print $key, ": \n";
24 printf "\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n",
25 $a->{Data}->{Images}->[$key]->{'Date'},
26 $a->{Data}->{Images}->[$key]->{'ImagePath'},
27 $a->{Data}->{Images}->[$key]->{'ThumbPath'},
28 $a->{Data}->{Images}->[$key]->{'Caption'},
29 $a->{Data}->{Images}->[$key]->{'Comment'},
30 $a->{Data}->{Images}->[$key]->{'ModificationDate'};
31 }
32 }