[KPhotoAlbum] Command line filtering
Johannes Zarl-Zierl
johannes at zarl-zierl.at
Mon Feb 25 20:27:12 GMT 2019
Am Montag, 25. Februar 2019, 01:37:56 CET schrieb Robert Krawitz:
> If you want to send me the output of kpa-filter --dry-run, perhaps I
> can spot something (that prints out the entire generated code).
See attachment...
-------------- next part --------------
$ contrib/kpa-filter --dry-run
{
no warnings "uninitialized";
no warnings "numeric";
my %items_found;
my $matched_count = 0;
foreach my $child ($node->childNodes()) {
next if !isNode($child, "image");
%current_image=();
$current_image{"__node"} = $child;
$current_image{"__compressed"} = $compressed;
map { $current_image{$_->nodeName} = $_->value } $child->attributes();
my ($file) = $current_image{"file"};
my ($label) = $current_image{"label"};
my ($description) = $current_image{"description"};
my ($startDate) = $current_image{"startDate"};
my ($endDate) = $current_image{"endDate"};
my ($yearFrom) = $current_image{"yearFrom"};
my ($monthFrom) = $current_image{"monthFrom"};
my ($dayFrom) = $current_image{"dayFrom"};
my ($hourFrom) = $current_image{"hourFrom"};
my ($minuteFrom) = $current_image{"minuteFrom"};
my ($secondFrom) = $current_image{"secondFrom"};
my ($yearTo) = $current_image{"yearTo"};
my ($monthTo) = $current_image{"monthTo"};
my ($dayTo) = $current_image{"dayTo"};
my ($angle) = $current_image{"angle"};
my ($md5sum) = $current_image{"md5sum"};
my ($width) = $current_image{"width"};
my ($height) = $current_image{"height"};
my ($rating) = $current_image{"rating"};
my ($stackId) = $current_image{"stackId"};
my ($stackOrder) = $current_image{"stackOrder"};
my ($videoLength) = $current_image{"videoLength"};
# Restore any attributes defaulted in version 8
$current_image{"angle"} = 0 if (! defined $current_image{"angle"});
$current_image{"endDate"} = $current_image{"startDate"} if (! defined $current_image{"endDate"});
if (! defined $current_image{"label"}) {
my ($label) = $file;
$label =~ s,^.*/(.*)\.[^.]*$,$1,;
$current_image{"label"} = $label;
}
my ($mediaType) = defined $videoLength ? "Video" : "Image";
if (1) {
$matched_count++;
print "$file\n";
}
}
}
More information about the Kphotoalbum
mailing list