Store Image order

1 view
Skip to first unread message

glad

unread,
Jun 25, 2009, 9:54:43 AM6/25/09
to iphotoexport-users
As order matters to many of us, I suggest changing line 280 of
iphotoexport.py:

from:
album_basename = self.make_album_basename(base_name)

to:
album_basename = self.make_album_basename(str(entries) + " " +
base_name)

This will put an additional number in front of base_name of the saved
image, thus maintaining the order in which images are laid out in the
album.

Or, is there an option I overlooked?

Many many thanks for this application. iPhoto.app built-in export
functionality sucks.

Tilman Sporkert

unread,
Jun 25, 2009, 12:59:18 PM6/25/09
to iphotoexp...@googlegroups.com
Let me think about that. Maybe it could be an option, or a template.
Personally, I caption my images like
20090620 Party - 1
20090620 Party - 2
20090622 Graduation - 1
20090622 Graduation - 2
...
so they happen to come out in the proper order because the captions,
with the date and the suffix, sort the right way.

In your proposal, the prefix should probably be padded, so that you get
01 foobar
02 foobar
...
10 foobar
11 foobar

instead of

1 foobar
10 foobar
11 foobar
12 foobar
...
2 foobar
20 foobar

Tilman

glad

unread,
Jun 25, 2009, 5:17:04 PM6/25/09
to iphotoexport-users
thank you about the response. Apple does a natural sort when listing
files, so there's no need for a padding (on a mac).
Actually thinking about it, you may never know how much padding you
will need beforehand, therefore padding needs to occur at the end of
the script.. However for most users padding will be a nice option.

I noticed some odd behaviour in the script:
./iphotoexport.py -k -a "a folder" ~/Pictures/iPhoto\ Library ~/
testiphotoexport
where "a folder" is a folder and not an album. The script will only
check, if there are pictures directly below "a folder".
However, when I request "an album below a folder" which actually
contains images, the script will even produce the parent folder "a
folder" at the destination (which is nice).

iPhoto:
a folder/an album/ ... pictures

iphotoexport:
request "a folder" -> nothing
request "an album" -> creates a folder/an album/ ... pictures

I suppose I expected the search to be recursive as it's the behaviour
of iPhoto to show contents of folders recursively, which I like.

Tilman Sporkert

unread,
Jun 25, 2009, 5:37:44 PM6/25/09
to iphotoexp...@googlegroups.com
On Thu, Jun 25, 2009 at 2:17 PM, glad <goo...@blondella.de> wrote:

thank you about the response. Apple does a natural sort when listing
files, so there's no need for a padding (on a mac).
Actually thinking about it, you may never know how much padding you
will need beforehand, therefore padding needs to occur at the end of
the script.. However for most users padding will be a nice option.

Yes, I know how many images there are, and could adjust the padding. iphotoexport is meant to share your images with other systems and applications, and many sort strictly by the literal string values. For flexibility, I'll probably use some sort of template that you supply to the script. Everybody has a slightly different way of titling their pictures.

I noticed some odd behaviour in the script:
./iphotoexport.py -k -a "a folder" ~/Pictures/iPhoto\ Library ~/
testiphotoexport
where "a folder" is a folder and not an album. The script will only
check, if there are pictures directly below "a folder".
However, when I request "an album below a folder" which actually
contains images, the script will even produce the parent folder "a
folder" at the destination (which is nice).

iPhoto:
a folder/an album/ ... pictures

iphotoexport:
request "a folder" -> nothing
request "an album" -> creates a folder/an album/ ... pictures

I suppose I expected the search to be recursive as it's the behaviour
of iPhoto to show contents of folders recursively, which I like.

Yes, -a is a filter on album names, and does not look at folder names. That can be changed easily.

Thanks for the feedback.

Tilman



--
Tilman Sporkert   (til...@sporkert.com)

Tilman

unread,
Jun 27, 2009, 11:56:33 PM6/27/09
to iphotoexport-users
Check out iphotoexport-1.2. "-a" will now match on folder names, too,
and you can customize the image names a little bit with the -n option.
For example, to prefix the captions with a sequential number, use
-n "\${index} \${caption}"
The \ is needed so that the shell doesn't think ${index} is a shell
variable.

Tilman
Reply all
Reply to author
Forward
0 new messages