Dec 12, 2009 00:46
The Playstation 3 has a pretty good image viewer. It's fast, easily usable.. well, it's all you need to display pictures in the living room. Almost. It doesn't let you alter the order of the pictures. They're always ordered by filename. That's crap.
So I wrote this little shell command which will create a script to rename all pictures in a directory to include the exif timestamp at the beginning of their name so they'll be ordered by time, effectively.
find -iname "*.jpg" |sed 's/.\///' | awk -v q='"' '{print "mv \x27" $0 "\x27 `exiv2 pr " q $0 q "|grep --binary-files=text timestamp |sed \x27s/I.*: //g\x27 |sed \x27s/[ :]/_/g\x27`" q "_"$0 q}' > rename.sh
ps3,
hacking,
computer