LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-08-2007, 01:33 PM   #1
lrt
Member
 
Registered: Sep 2007
Location: Chattanooga, TN
Distribution: Ubuntu
Posts: 84

Rep: Reputation: 15
querying exiftool keywords (flickr-like)


i need to tag a bunch of image files for searching. i realize this can be done by editing the 'keywords' metadata tag. i found a great little program to help me do this called exiftool, http://owl.phy.queensu.ca/~phil/exiftool/

maybe someone knows how to use this program better than i do. i want exiftool to be able to list only the filenames containing a specified keyword.

exiftool has an '-if' option (see man page) to specify a condition but this doesn't really seem to work when it has to look through a list of keywords. but maybe it can and i just don't know how.

for example, this command does NOT return the file which contains the keyword shoe if this file has more than one keyword. the operator 'eq' doesn't really work for this.

exiftool -keywords -if '$keywords eq "shoe"' pictures/

so if i have a file with keywords 'shoe, pants, shirt' this command will not work because it will look for an exact match of the the string 'shoe'

any ideas on how to modify this???

(essentially i want to create something like flickr.com, but for private business purposes).
 
Old 11-11-2007, 07:26 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Here's an example with tag "exif:ImageDescription":
Code:
exiftool -exif:ImageDescription="a shoe"  /tmp/test.jpg
exiftool -exif:ImageDescription="not a shoe"  /tmp/test1.jpg
exiftool -exif:ImageDescription="shoo cat"  /tmp/test2.jpg

exiftool -FileName -if '$ImageDescription =~ "a shoe"' /tmp/test*.jpg | grep ^F
File Name                       : test1.jpg
File Name                       : test.jpg
 
Old 11-12-2007, 10:06 AM   #3
lrt
Member
 
Registered: Sep 2007
Location: Chattanooga, TN
Distribution: Ubuntu
Posts: 84

Original Poster
Rep: Reputation: 15
exactly what i needed, thanks.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Flickr and Creative Commons LXer Syndicated Linux News 0 09-29-2007 12:10 PM
Simple download from flickr (Perl?) Plastech Linux - Software 2 05-22-2007 05:21 PM
Konquero and the flickr.com Orhanize lumiwa Linux - Newbie 0 01-06-2007 06:20 PM
LXer: The Linux way to Flickr LXer Syndicated Linux News 0 12-05-2006 01:54 PM
for how much did Yahoo! buy out Flickr? asif2k General 1 08-08-2006 08:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration