--IS0zKkzwUGydFO0o
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.
[1]
http://impressive.net/people/gerald/2001/05/photosuck
--
Gerald Oskoboiny <gerald@impressive.net>
http://impressive.net/people/gerald/
--IS0zKkzwUGydFO0o
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=photosuck
#!/bin/sh
#
# 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 $
#
temp=".photosuck.$$"
mediadir="/sm"
if [ $# -ne 0 ]; then
target=$1
else
target="."
fi
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
--IS0zKkzwUGydFO0o--