Re: Photo sorter a la photopc



Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Sun, May 06, 2001 at 04:08:58PM +0900, Hugo Haas wrote:
> PCMCIA adapters are *much* faster than serial ports for downloading
> pictures from SmartMedia cards.

Yeah, what a great purchase for only $85 HKD! (~$11 USD) I think
when I looked into buying one of these just after I got my digital
camera, it was something like $60 USD. Now I don't know how I lived
without it. Using the serial cable to upload photos from the camera
was so slow.

Now I really want to find a smartmedia mp3 player... maybe at
Akihabara in Tokyo this Friday.

> However, by accessing the filesystem directly, you lose the naming
> scheme used by photopc. I use the '-f 4' option which organizes the
> pictures as follows:
>       YYYY/MM/DD/HH_MM_SS.jpg
> Since I like this scheme, I have written a small script (attached)
> which moves pictures from the card to their final destination.

I wrote a script to do the same thing ([1], attached). It uses
epinfo to do all the dirty work, thanks to the -r option :)

      -r   Rename files, generating new name based on  the  time
           of snapshot and -f option value.

>     open(EPINFO, "/usr/bin/epinfo $file |") || printf('epinfo error: %s', $!);
>     my $gmtdate;
>     while(<EPINFO>) {
>         if (m/^DateTime="(.*)"$/) {

When I was writing my script, I found an option in the epinfo man
page that I didn't know about before: -T

      -T <TagName>
           Output the value of this keyword in  the  information
           block.   Note that keywords are case sensitive.

so you could have done "epinfo -T DateTime" instead.


Gerald Oskoboiny <>

Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=photosuck

# photosuck: extract photos from a smartmedia card via pcmcia card,
# then rename them by date using epinfo.
# usage: photosuck [ targetdir ]
#        where targetdir is an optional target directory
#        (default is the current directory)
# this script assumes that you already have a smartmedia card mounted,
# the location is specified below.
# Gerald Oskoboiny, 6 May 2001
# $Id: photosuck,v 1.2 2001/05/09 07:11:57 gerald Exp $


if [ $# -ne 0 ]; then

mkdir $temp
# @@ use cp -r instead
cp $mediadir/dcim/*/* $temp # epinfo -r no worky across filesystems
cd $target
epinfo -rf "%Y/%m/%d/%H-%M-%S.jpg" $temp/*
find $target -type f -print | xargs chmod 0644
find $target -type d -print | xargs chmod 0755
rm -rf $temp


Re: Photo sorter a la photopc


  • None.


At 17:11 5/9/2001 +0900, Gerald Oskoboiny wrote:
>Now I really want to find a smartmedia mp3 player... maybe at
>Akihabara in Tokyo this Friday.

I was greatly dissapointed to find the mp3 market in Tokyo is as bad as it
was in HK. Yiuichi and I went all over looking for a decent selection! Turns
out MP3 is competing with minidisc (not good) and the only products are the
Sony copy-crippled versions. So the few players get a bad rap regardless.

So, I'm likely to buy one of these Samsung players via the Internet (with
some rebates if possible) as I originally intended. The only tricky thing is
I heard these players tend to be "slow" over USB. However, I've been puzzled
as to how various reviewers can notice substantive differences in file
transmission speed over USB, but I guess the drivers differ with respect to
their quality:

In terms of renaming files, I typically copy a bunch of grouped files to a
temp directory for processing, then run the following. I'm relying on the
datestamp to provide the date, which usually works, but the epinfo would be
better should I edit a file before renaming them...

ls -l --full-time | awk 'BEGIN {IGNORECASE=0}; /JPG/ {printf "mv %s
%s-token-%i.jpg;\n", $11, $8, sum++}' | bash

Joseph Reagle     E0 D5 B2 05 B6 12 DA 65  BE 4D E3 C1 6A 66 25 4E
MIT LCS Research Engineer at the World Wide Web Consortium.

* This email is from an independent academic account and is
not necessarily representative of my affiliations.

Re: Photo sorter a la photopc


  • None.


On Wed, May 09, 2001 at 05:11:27PM +0900, Gerald Oskoboiny wrote:

> I wrote a script to do the same thing ([1], attached).

> find $target -type f -print | xargs chmod 0644
> find $target -type d -print | xargs chmod 0755

oops, I discovered a bad bug in my script last night, these lines
reset the file permissions on your whole web site, which wasn't
intended. That's fixed in the current version (1.3).

> [1]

Gerald Oskoboiny <>

HURL: fogo mailing list archives, maintained by Gerald Oskoboiny