[Solved]: Help - Generate Key Words from Filename? [Solved]: Help - Generate Key Words from Filename?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

[Solved]: Help - Generate Key Words from Filename?

Started by qemart, March 19, 2004, 12:18:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

qemart

(1000 apologies if this is answered somewhere but I searched and read until my eyes were bugging out of my head :shock: and found nada...)

I have a large directory structure of images and each image filename contains relevant info for indexing (eg. 1982tor02.jpg = Year 1982 ::  Toronto :: Image#02).  I am wondering how I would go about adding the 20000 images to my coppermine install in such a way as to allow for a search on "Toronto" to return a result containing all images with "tor" in the filename.

Any and all help is more than appreciated.

Joachim Müller

There's no mod available for this yet, and I wouldn't do such a mod to modify the search this way. Instead, I'd write a small script that runs through all entries in your database once (table cpg11d_pictures) and let it scan for "tor". If "tor" is found in the filename, add "Toronto" to the keywords. If you have an advanced naming scheme, then apply it this way.

If you have album names or file/folder structure set up in a way that makes sense, you could as well do something likeUPDATE `cpg11d_pictures` SET `keywords` = 'Toronto 1982' WHERE `filepath ` = 'my_pics/toronto/1982/';

GauGau

P.S. Please don't ask me to create such a mod for you, since no-one else could use it, and it'd take me some time to do this mod. If you need it, you'll probably have to write it yourself.

qemart

Thanks - that worked perfectly.