Re: Command line filtering

Johannes Zarl-Zierl <[email protected]>
Newsgroups gmane.comp.kde.kimdaba
Message-ID <4513340.amz8BQlrlq@mani>
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...

_______________________________________________
KPhotoAlbum mailing list
[email protected]
https://mail.kdab.com/mailman/listinfo/kphotoalbum
kpa-filter-dry-run.txt (text/plain, 2.1 KB)
$ 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";
        }
    }
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.