I use Google Picasa to organize my photos. When editing a photo, in Picasa, a directory called .picasaoriginals is created. This directory holds earlier versions of the edited photos.
When I used import_tree to populate my piwigo installation, the script saw the .picasaoriginals directories and inserted them into piwigo. I did not want this to happen.
So, my request is a parameter that allows import_tree to ignore certain directory names. Either a --omit paramter that specifies directory names or perhaps specifies a file name where the file contains the names of directories to omit.
In my case I manually edited the perl script and omitted any directory with .picasaoriginals in the name. But, I know next to nothing about perl and would never submit my hacked up version.
Ken
Offline
Why not post your 'hack' and maybe someone who knows perl well could comment ;)
Offline
Unfortunately, my solution is specific to skipping just the .picasaoriginals directory. A more generic solution, where perhaps multiple directory names could be skipped, would be preferable. Also, the directory name(s) should be specified as an input parameter, rather than hard-coded. But, anyway here's what I did:
In the function add_to_piwigo -
I changed:
if (not defined $piwigo_albums{$up_dir.$dir}) {
to:
if ((not defined $piwigo_albums{$up_dir.$dir}) && (not ($dir =~ m/.picasaoriginals/))) {
and I changed:
if (-f and $path =~ /\.(jpe?g|gif|png)$/i) {
to:
if ((-f and $path =~ /\.(jpe?g|gif|png)$/i ) && (not ($path =~ m/.picasaoriginals/))) {
Ken
Offline