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

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

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 2 Guests 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.